You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Alan Gates (JIRA)" <ji...@apache.org> on 2008/07/07 18:45:32 UTC

[jira] Created: (PIG-292) Order by on more than one field returns wrong order

Order by on more than one field returns wrong order
---------------------------------------------------

                 Key: PIG-292
                 URL: https://issues.apache.org/jira/browse/PIG-292
             Project: Pig
          Issue Type: Bug
    Affects Versions: types_branch
            Reporter: Alan Gates
            Assignee: Alan Gates


Pig scripts with order by of a single column work fine.  But once a second column is added the data is returned in the wrong order.

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


[jira] Resolved: (PIG-292) Order by on more than one field returns wrong order

Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Gates resolved PIG-292.
----------------------------

    Resolution: Fixed

manysort patch committed.

> Order by on more than one field returns wrong order
> ---------------------------------------------------
>
>                 Key: PIG-292
>                 URL: https://issues.apache.org/jira/browse/PIG-292
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>         Attachments: manysortfixes.patch, PIG-292_test.patch
>
>
> Pig scripts with order by of a single column work fine.  But once a second column is added the data is returned in the wrong order.

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


[jira] Updated: (PIG-292) Order by on more than one field returns wrong order

Posted by "Pi Song (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pi Song updated PIG-292:
------------------------

    Attachment: PIG-292_test.patch

It seems to be OK except when you use DESC keyword.

Unit tests attached.

> Order by on more than one field returns wrong order
> ---------------------------------------------------
>
>                 Key: PIG-292
>                 URL: https://issues.apache.org/jira/browse/PIG-292
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>         Attachments: PIG-292_test.patch
>
>
> Pig scripts with order by of a single column work fine.  But once a second column is added the data is returned in the wrong order.

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


[jira] Updated: (PIG-292) Order by on more than one field returns wrong order

Posted by "Santhosh Srinivasan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Santhosh Srinivasan updated PIG-292:
------------------------------------

    Fix Version/s: types_branch

> Order by on more than one field returns wrong order
> ---------------------------------------------------
>
>                 Key: PIG-292
>                 URL: https://issues.apache.org/jira/browse/PIG-292
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>             Fix For: types_branch
>
>         Attachments: manysortfixes.patch, PIG-292_test.patch
>
>
> Pig scripts with order by of a single column work fine.  But once a second column is added the data is returned in the wrong order.

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


[jira] Updated: (PIG-292) Order by on more than one field returns wrong order

Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Gates updated PIG-292:
---------------------------

    Attachment: manysortfixes.patch

This patch contains a lot. The relevant areas are:

1) Fixed DataByteArray.compareTo to first check byte to byte and only size when the bytes compare equal, instead of other way around (that is, it now matches String.compareTo behavior).

2) Fixed use of binary comparator for hadoop sorting. It was being used anytime we were sorting on a tuple. It should instead be used anytime we are not doing an order by.

> Order by on more than one field returns wrong order
> ---------------------------------------------------
>
>                 Key: PIG-292
>                 URL: https://issues.apache.org/jira/browse/PIG-292
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>         Attachments: manysortfixes.patch, PIG-292_test.patch
>
>
> Pig scripts with order by of a single column work fine.  But once a second column is added the data is returned in the wrong order.

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