Limit produce wrong number of records after foreach flatten
-----------------------------------------------------------
Key: PIG-2231
URL: https://issues.apache.org/jira/browse/PIG-2231
Project: Pig
Issue Type: Bug
Components: impl
Affects Versions: 0.9.0, 0.8.1, 0.10
Reporter: Daniel Dai
Assignee: Daniel Dai
Fix For: 0.10
>From user mailing list:
>http://mail-archives.apache.org/mod_mbox/pig-user/201108.mbox/%3CCAPad=8E032ksPjy2bOynQezo1x+=0jxbh4t+msts7g_fvj_...@mail.gmail.com%3E,
> Sungho reported the following script produce wrong result as expected:
data = LOAD '1.txt' AS (k, v);
grouped = GROUP data BY k;
selected = LIMIT grouped 2;
flattened = FOREACH selected GENERATE FLATTEN (data);
dump flattened;
1.txt:
1 A
1 B
2 C
3 D
3 E
3 F
Expected result:
(1, A)
(1, B)
(2, C)
We get:
(1, A)
(1, B)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira