Pig
  1. Pig
  2. PIG-3347

Store invocation brings side effect

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.11
    • Fix Version/s: 0.12.1
    • Component/s: grunt
    • Labels:
      None
    • Environment:

      local mode

    • Hadoop Flags:
      Reviewed

      Description

      The problem is that intermediate 'store' invocation "changes" the final store output. Looks like it brings some kind of side effect. We did use 'local' mode to run script
      here is the input data:
      1
      1
      Here is the script:

      a = load 'test';
      
      a_group = group a by $0;
      b = foreach a_group {
        a_distinct = distinct a.$0;
        generate group, a_distinct;
      }
      --store b into 'b';
      c = filter b by SIZE(a_distinct) == 1;
      store c into 'out';
      

      We expect output to be:
      1 1
      The output is empty file.

      Uncomment

      --store b into 'b';

      line and see the diffrence.
      Yuo would get expected output.

      1. PIG-3347-1.patch
        4 kB
        Daniel Dai
      2. PIG-3347-2-testonly.patch
        5 kB
        Koji Noguchi
      3. PIG-3347-3.patch
        7 kB
        Daniel Dai
      4. PIG-3347-4-testonly.patch
        6 kB
        Koji Noguchi
      5. PIG-3347-5.patch
        9 kB
        Daniel Dai

        Activity

          People

          • Assignee:
            Daniel Dai
            Reporter:
            Sergey
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development