You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Gianmarco De Francisci Morales (JIRA)" <ji...@apache.org> on 2011/06/14 14:09:47 UTC
[jira] [Created] (PIG-2123) Support scalar relationship in nested
foreach
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