You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Dmitriy V. Ryaboy (Commented) (JIRA)" <ji...@apache.org> on 2011/11/14 22:55:52 UTC

[jira] [Commented] (PIG-2365) Current TOP implementation needlessly results in a null bag name

    [ https://issues.apache.org/jira/browse/PIG-2365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149972#comment-13149972 ] 

Dmitriy V. Ryaboy commented on PIG-2365:
----------------------------------------

pls use the new @OutputSchema annotation instead :-D
                
> Current TOP implementation needlessly results in a null bag name
> ----------------------------------------------------------------
>
>                 Key: PIG-2365
>                 URL: https://issues.apache.org/jira/browse/PIG-2365
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.9.1, 0.10
>            Reporter: Jonathan Coveney
>            Priority: Minor
>             Fix For: 0.10, 0.9.2
>
>         Attachments: top.patch
>
>
> Given that TOP is basically always used with FLATTEN, now that FLATTEN prepends the bag name, the output is suboptimal.
> a = load 'thing' as (x:int, y:int, z:int);
> b = group a all;
> c = foreach b generate flatten(TOP(10,1,a));
> describe c;
> --currently: c: {null::x: int,null::y: int,null::z: int}
> --without a one line change could be: c: {a::x: int,a::y: int,a::z: int}
> The current implementation actually throws away this info, so it's just a matter of not doing that. Patch attached.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira