Bug in plan built for Nested foreach
-------------------------------------
Key: PIG-1860
URL: https://issues.apache.org/jira/browse/PIG-1860
Project: Pig
Issue Type: Bug
Affects Versions: 0.8.0, 0.9.0
Reporter: Vivek Padmanabhan
Using the same inputs as in PIG-1858,
{code}
register myanotherudf.jar;
A = load 'myinput' using PigStorage() as (
date:chararray,bcookie:chararray,count:int,avg:double,pvs:int);
B = foreach A generate (int)(avg / 100.0) * 100 as avg, pvs;
C = group B by ( avg );
D = foreach C {
Pvs = order B by pvs;
Const = org.vivek.MyAnotherUDF(Pvs.pvs).(count,sum);
generate Const.sum as sum;
};
store D into 'out_D';
{code}
In this script even though I am passing Pvs.pvs to the UDF in the nested
foreach, at runtime the "avg" is getting passed.
It looks like the logical plan created for D is wrong.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira