You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Jonathan Coveney (Commented) (JIRA)" <ji...@apache.org> on 2012/02/10 20:14:59 UTC

[jira] [Commented] (PIG-438) Handle realiasing of existing Alias (A=B;)

    [ https://issues.apache.org/jira/browse/PIG-438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205655#comment-13205655 ] 

Jonathan Coveney commented on PIG-438:
--------------------------------------

I actually have a patch that does this pretty trivially. It just takes B = A; and converts it to B = FOREACH A GENERATE *; The only issue is that this affects some error messages and whatnot, and I wasn't able to fix that. Attaching.
                
> Handle realiasing of existing Alias (A=B;) 
> -------------------------------------------
>
>                 Key: PIG-438
>                 URL: https://issues.apache.org/jira/browse/PIG-438
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Pradeep Kamath
>            Priority: Minor
>
> We do not handle re-aliasing of an existing alias - this should be handled correctly.
> The following script should work:
> {code}
> a = load 'studenttab10k';
> b = filter a by $1 > '25';
> c = b;
> -- use b
> d = cogroup b by $0, a by $0;
> e = foreach d generate flatten(b), flatten(a);
> dump e
> -- use c
> f = cogroup c by $0, a by $0;
> g = foreach f generate flatten(c), flatten(a);
> dump g;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira