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 2010/01/28 01:44:36 UTC

[jira] Resolved: (PIG-1179) Consecutives ORDER BY on the same relation don't work

     [ https://issues.apache.org/jira/browse/PIG-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olga Natkovich resolved PIG-1179.
---------------------------------

    Resolution: Cannot Reproduce

We are unable to reproduce this with latest code. Please, reopen if you have a reproducible case that you can share

> Consecutives ORDER BY on the same relation don't work
> -----------------------------------------------------
>
>                 Key: PIG-1179
>                 URL: https://issues.apache.org/jira/browse/PIG-1179
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.5.0
>            Reporter: Vincent BARAT
>             Fix For: 0.7.0
>
>
> It seems there is a bug in PIG when ORDER BY is used twice on the same relation using ASC and DESC
> I have the following script:
> imei_start = FOREACH sessions GENERATE imei, start;
> imei_starts = GROUP imei_start BY imei;
> imei_retained_period = FOREACH imei_starts {
>   ordered_imei_start = ORDER imei_start BY start DESC;
>   first_start = LIMIT ordered_imei_start 1;
>   rev_ordered_imei_start = ORDER imei_start BY start ASC;
>   last_start = LIMIT rev_ordered_imei_start 1;
>   GENERATE group, ordered_imei_start, rev_ordered_imei_start;
> };
> ordered_imei_start and rev_ordered_imei_start are actually the same (they are both sorted in the ASC way) and so last_start is always equal to first_start.
> If only one of the 2 ORDER BY is performed, there is no issue.

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