You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Daniel Dai (JIRA)" <ji...@apache.org> on 2010/01/19 20:02:54 UTC

[jira] Commented: (PIG-1195) POSort should take care of sort order

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

Daniel Dai commented on PIG-1195:
---------------------------------

Thanks Alan. Actually after talking with Ying, I realize originally POSort use mComparator to do the sorting. This code is broken in the current code, we should fix this rather than introduce something new.

> POSort should take care of sort order
> -------------------------------------
>
>                 Key: PIG-1195
>                 URL: https://issues.apache.org/jira/browse/PIG-1195
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.6.0
>            Reporter: Daniel Dai
>             Fix For: 0.6.0
>
>         Attachments: PIG-1195-1.patch, PIG-1195-2.patch
>
>
> POSort always use ascending order. We shall obey the sort order as specified in the script.
> For example, the following script does not do the right thing if we turn off secondary sort (which means, we will rely on POSort to sort):
> {code}
> A = load 'input' as (a0:int);
> B = group A ALL;
> C = foreach B {
>     D = order A by a0 desc;
>     generate D;
> };
> dump C;
> {code}
> If we run it using the command line "java -Xmx512m -Dpig.exec.nosecondarykey=true -jar pig.jar 1.pig".
> The sort order for D is ascending.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.