[ https://issues.apache.org/jira/browse/PIG-2687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rohini Palaniswamy updated PIG-2687: ------------------------------------ Fix Version/s: (was: 0.17.0) 0.18.0 > 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.18.0 > > > 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 was sent by Atlassian JIRA (v6.3.15#6346)