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

Nested order is broken after PIG-3591 in some cases

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.16.0, 0.15.1
    • impl
    • None
    • Reviewed

    Description

      The following script fail after PIG-3591.

      a = load '1.txt' using PigStorage(',') as (a0:chararray, a1:chararray);
      b = load '2.txt' as (b0:chararray);
      c = cogroup b by b0, a by a0;
      d = foreach c {
          a_sorted = order a by a1 desc;
          generate group, a_sorted, b;
      }
      dump d;
      

      1.txt
      a,0
      a,2
      a,1

      2.txt
      a

      Expected:

      (a,{(a,1),(a,2),(a,0)},{(a)})
      

      Actual:

      (a,{(a,2),(a,1),(a,0),(a)},{})
      

      Attachments

        1. PIG-4683-1.patch
          4 kB
          Daniel Dai
        2. PIG-4683-2.patch
          4 kB
          Daniel Dai

        Issue Links

          Activity

            People

              daijy Daniel Dai
              daijy Daniel Dai
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: