[
https://issues.apache.org/jira/browse/PIG-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13624968#comment-13624968
]
Daniel Dai commented on PIG-3060:
---------------------------------
All unit tests pass.
> FLATTEN in nested foreach fails when the input contains an empty bag
> --------------------------------------------------------------------
>
> 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
> Assignee: Daniel Dai
> Fix For: 0.12
>
> Attachments: PIG-3060-1.patch
>
>
> 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