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

in nested foreach, accumutive udf taking input from order-by does not get results in order

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.8.0, 0.9.0
    • 0.8.1
    • None
    • None

    Description

      This happens only when secondary sort is not being used for the order-by.
      For example -

      a1 = load 'fruits.txt' as (f1:int,f2);
      a2 = load 'fruits.txt' as (f1:int,f2);
      
      b = cogroup a1 by f1, a2 by f1;
      
      d = foreach b {
         sort1 = order a1 by f2;
         sort2 = order a2 by f2; -- secondary sort not getting used here, MYCONCATBAG gets results in wrong order
         generate group, MYCONCATBAG(sort1.f1), MYCONCATBAG(sort2.f2);
      }
      
      -- explain d;
      dump d;
      

      Attachments

        1. MYCONCATBAG.java
          2 kB
          Thejas Nair
        2. PIG-1963.1.1.patch
          2 kB
          Thejas Nair
        3. PIG-1963.1.patch
          4 kB
          Thejas Nair

        Activity

          People

            thejas Thejas Nair
            thejas Thejas Nair
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: