You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Koji Noguchi (JIRA)" <ji...@apache.org> on 2014/02/01 00:32:12 UTC

[jira] [Updated] (PIG-3347) Store invocation brings side effect

     [ https://issues.apache.org/jira/browse/PIG-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Koji Noguchi updated PIG-3347:
------------------------------

    Attachment: PIG-3347-2-testonly.patch

[~daijy], I think your testcase in the patch succeeds even without your patch since it's missing FilterAboveForeach optimization.

Uploading a test-only patch with this change.  Added 2 more test cases for nested limit and nested filter. 

Nested distinct and nested limit are fixed with your current patch.  Nested filter still fails.

> Store invocation brings side effect
> -----------------------------------
>
>                 Key: PIG-3347
>                 URL: https://issues.apache.org/jira/browse/PIG-3347
>             Project: Pig
>          Issue Type: Bug
>          Components: grunt
>    Affects Versions: 0.11
>         Environment: local mode
>            Reporter: Sergey
>            Assignee: Daniel Dai
>            Priority: Critical
>             Fix For: 0.12.1
>
>         Attachments: PIG-3347-1.patch, PIG-3347-2-testonly.patch
>
>
> 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:
> {code}
> 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';
> {code}
> We expect output to be:
> 1 1
> The output is empty file.
> Uncomment {code}--store b into 'b';{code} line and see the diffrence.
> Yuo would get expected output.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)