Semantics of Filter statement inside ForEach should support filtering on
aliases used in the Group statement preeceding it
--------------------------------------------------------------------------------------------------------------------------
Key: PIG-772
URL: https://issues.apache.org/jira/browse/PIG-772
Project: Pig
Issue Type: Bug
Components: impl
Affects Versions: 0.3.0
Reporter: Viraj Bhat
Priority: Minor
Fix For: 0.3.0
I have a Pig script which tries to display all bags which are greater than the
average value in the group.
{code}
A = LOAD 'half.txt' AS (key:CHARARRAY, val:INT);
B = GROUP A BY key;
C = FOREACH B {
N = AVG(A.val);
HALF = FILTER A by val >= N;
GENERATE
FLATTEN(GROUP),
HALF;
};
dump C;
{code}
Presently the semantics of the Filter statement inside the FOREACH does not
support these types of operations.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.