Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-1482

Pig gets confused when more than one loader is involved

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.7.0
    • 0.8.0
    • None
    • None
    • Reviewed

    Description

      In case of two relations being loaded using different loader, joined, grouped and projected, pig gets confused in trying to find appropriate loader for the requested cast. Consider the following script :-

      A = LOAD 'data1' USING PigStorage() AS (s, m, l);
      B = FOREACH A GENERATE s#'k1' as v1, m#'k2' as v2, l#'k3' as v3;
      C = FOREACH B GENERATE v1, (v2 == 'v2' ? 1L : 0L) as v2:long, (v3 == 'v3' ? 1 :0) as v3:int;

      D = LOAD 'data2' USING TextLoader() AS (a);
      E = JOIN C BY v1, D BY a USING 'replicated';

      F = GROUP E BY (v1, a);
      G = FOREACH F GENERATE (chararray)group.v1, group.a;

      dump G;

      This throws the error, stack trace of which is in the next comment

      Attachments

        1. jira-1482-final-2.patch
          41 kB
          Xuefu Zhang
        2. jira-1482-final-1.patch
          42 kB
          Xuefu Zhang
        3. jira-1482-final.patch
          32 kB
          Xuefu Zhang
        4. jira-1482-final.patch
          32 kB
          Xuefu Zhang
        5. jira-1482-final.patch
          41 kB
          Xuefu Zhang

        Activity

          People

            xuefuz Xuefu Zhang
            ankur Ankur Bansal
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: