Support scalar relationship in nested foreach
---------------------------------------------

                 Key: PIG-2123
                 URL: https://issues.apache.org/jira/browse/PIG-2123
             Project: Pig
          Issue Type: Improvement
            Reporter: Gianmarco De Francisci Morales
            Priority: Minor


It would be nice to have the possibility to compute and use scalar relationship 
inside a nested foreach block.

As an example, the following code is not currently supported by Pig.

{code}
a = LOAD 'data.txt' AS (id:chararray, num:int);                                 
                     
b = GROUP a BY id; 
c = FOREACH b { n = COUNT(a); d = FILTER a BY num == n; GENERATE d; };
{code}

This would be useful with LIMIT and SAMPLE as well.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to