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

java.lang.IndexOutOfBoundsException failure with LimitOptimizer + ColumnPruning

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.10.0, 0.11
    • 0.11, 0.12.0
    • parser
    • None

    Description

      Had a user hitting
      "Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1" error when he had multiple stores and limit in his code.

      I couldn't reproduce this with short pig code (due to ColumnPruning somehow not happening when shortened), but here's a snippet.

      ...
      G3 = FOREACH G2 GENERATE sortCol, FLATTEN(group) as label, (long)COUNT(G1) as cnt;
      G4 = ORDER G3 BY cnt DESC PARALLEL 25;
      ONEROW = LIMIT G4 1;
      U1 = FOREACH ONEROW GENERATE 3 as sortcol, 'somelabel' as label, cnt;
      store U1 into 'u1' using PigStorage();
      store G4 into 'g4' using PigStorage();
      

      With '-t ColumnMapKeyPrune', job didn't hit the error.

      Attachments

        1. pig-3051-v1-withouttest.txt
          3 kB
          Koji Noguchi
        2. pig-3051-v1.1-withe2etest.txt
          5 kB
          Koji Noguchi
        3. pig-3051-v2.1-withe2etest.txt
          5 kB
          Koji Noguchi

        Activity

          People

            knoguchi Koji Noguchi
            knoguchi Koji Noguchi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: