You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Olga Natkovich (JIRA)" <ji...@apache.org> on 2011/08/22 20:59:28 UTC
[jira] [Commented] (PIG-2231) Limit produce wrong number of records
after foreach flatten
[ https://issues.apache.org/jira/browse/PIG-2231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13088930#comment-13088930 ]
Olga Natkovich commented on PIG-2231:
-------------------------------------
I believe this should go into 9.1 given that we might producing wrong results
> 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.8.1, 0.9.0, 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_EhQ@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