Youngwook Kim created PIG-3060:
----------------------------------
Summary: Nested flatten fails when the input contains empty bags
Key: PIG-3060
URL: https://issues.apache.org/jira/browse/PIG-3060
Project: Pig
Issue Type: Bug
Components: impl
Affects Versions: 0.10.0
Reporter: Youngwook Kim
FLATTEN inside a foreach statement produces wrong results, if the input
contains an empty bag.
{code}
A = load 'flatten.txt' as (a0:int, a1:bag{(t:chararray)});
B = group A by a0;
C = foreach B {
c1 = foreach A generate FLATTEN(a1);
generate COUNT(c1);
};
{code}
The easy workaround is to filter out empty bags.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira