You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Daniel Dai (JIRA)" <ji...@apache.org> on 2015/04/29 03:06:07 UTC
[jira] [Updated] (PIG-2687) Add relation/operator scoping to Pig
[ https://issues.apache.org/jira/browse/PIG-2687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Dai updated PIG-2687:
----------------------------
Fix Version/s: (was: 0.15.0)
0.16.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.16.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.4#6332)