[
https://issues.apache.org/jira/browse/PIG-2687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Olga Natkovich updated PIG-2687:
--------------------------------
Fix Version/s: (was: 0.11)
0.12
> Add relation/operator scoping to Pig
> ------------------------------------
>
> Key: PIG-2687
> URL: https://issues.apache.org/jira/browse/PIG-2687
> Project: Pig
> Issue Type: Improvement
> Reporter: Jonathan Coveney
> Priority: Minor
> Fix For: 0.12
>
>
> The idea is to add a real notion of scope that can be used to manage
> namespace. This would mean the addition of blocks to pig, probably with some
> sort of syntax like this...
> {code}
> a = load thing as (x:int, y:int);
> b = foreach a generate x, y, x*y as z;
> {
> a = group b by z;
> b = foreach a generate COUNT(b);
> global b;
> }
> {code}
> which would replace the alias b with the nested b value in the scope. This
> could also be used in nested foreach blocks, and macros could just become
> blocks as well.
> I am 95% sure about how to implement this... I have a failed patch attempt,
> and need to study a bit more about how Pig uses its logical operators.
> Any thoughts?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira