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

Infinite loop with accumulator function in nested foreach

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.8.0
    • 0.8.1
    • None
    • 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.08.1.patch
          7 kB
          Thejas Nair
        2. PIG-1911.trunk.1.patch
          6 kB
          Thejas Nair

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment