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

Infinite loop with accumulator function in nested foreach

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.8.1
    • Component/s: None
    • Labels:
      None

      Description

      Sample script:

      register v_udf.jar;
      a = load '2records' as (f1:chararray,f2:chararray);
      b = group a by f1;
      d = foreach b

      { sort = order a by f1; generate org.udfs.MyCOUNT(sort) as something ; }

      dump d;

      This causes infinite loop if MyCOUNT implements Accumulator interface.

      The workaround is to take the function out of nested foreach into a separate foreach statement.

        Attachments

        1. PIG-1911.trunk.1.patch
          6 kB
          Thejas Nair
        2. PIG-1911.08.1.patch
          7 kB
          Thejas Nair

          Activity

            People

            • Assignee:
              thejas Thejas Nair
              Reporter:
              olgan Olga Natkovich
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: