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

Pig takes forever to parse scripts with foreach + multi level binconds

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 0.10.0, 0.11
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Following pig script parsing takes

      • 1 second in pig-0.8
      • 90 seconds in pig-0.9
      • forever in pig-0.10 (it's taking literally hours)
      A = load 'input.txt' as (mynum:float, mychar:chararray);
      B = foreach A generate mychar,
      (mynum < 0 ? 0 :
      (mynum < 1 ? 1 :
      (mynum < 2 ? 2 :
      (mynum < 3 ? 3 :
      (mynum < 4 ? 4 :
      (mynum < 5 ? 5 :
      (mynum < 6 ? 6 :
      (mynum < 7 ? 7 :
      (mynum < 8 ? 8 :
      (mynum < 9 ? 9 :
      (mynum < 10 ? 10 :
      (mynum < 11 ? 11 :
      (mynum < 12 ? 12 :
      (mynum < 13 ? 13 :
      (mynum < 14 ? 14 :
      (mynum < 15 ? 15 :
      (mynum < 16 ? 16 :
      (mynum < 17 ? 17 :
      (mynum < 18 ? 18 :
      (mynum < 19 ? 19 :
      (mynum < 20 ? 20 : 21)))))))))))))))))))));
      dump A;
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                knoguchi Koji Noguchi
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: