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

PluckTuple overwrites regex if used more than once in the same script

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

Details

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

    Description

      If you define two PluckTuples with different regexes, and use them together, they will overwrite the regex field of one another's (this will not affect cases where non-regex prefixes are used).

      Example (from testOutput in TestPluckTuple.java, modified)

      a = load 'a' using mock.Storage();
      b = load 'b' using mock.Storage();
      c = join a by x, b by x;
      define pluck1 PluckTuple('a::.*');
      define pluck2 PluckTuple('b::.*');
      d = foreach c generate pluck1 AS pluck1, pluck2 AS pluck2;

      Expected:

      ((1,hey,2),(1,sasf,5))
      ((2,woah,3),(2,woah,6))

      Actual:

      ((1,sasf,5),(1,sasf,5))
      ((2,woah,6),(2,woah,6))

      Attachments

        1. PIG-4808.patch
          3 kB
          Eyal Allweil

        Activity

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

          People

            eyal Eyal Allweil
            eyal Eyal Allweil
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment