You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Ritesh Agrawal (JIRA)" <ji...@apache.org> on 2014/07/19 17:32:38 UTC

[jira] [Updated] (PIG-4062) Add ascending order option to builtin TOP function

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

Ritesh Agrawal updated PIG-4062:
--------------------------------

        Fix Version/s: 0.2.0
    Affects Version/s: 0.2.0
         Release Note: 
Changes
1. Added option to configure sorting order
2. Moved test cases from piggybank to builtin test folder
3. Updated function documentation. 
               Status: Patch Available  (was: Open)

> Add ascending order option to builtin TOP function
> --------------------------------------------------
>
>                 Key: PIG-4062
>                 URL: https://issues.apache.org/jira/browse/PIG-4062
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.2.0
>            Reporter: Ritesh Agrawal
>            Priority: Minor
>             Fix For: 0.2.0
>
>
> Builtin TOP function orders records in descending order. However in lot of cases you might want to get top N records in ascending order, such as when ordering records by rank, etc. The idea is to extend the TOP function so that it can be configured via DEFINE statement. For example 
> DEFINE TOPASC TOP("ASC");
> To keep it backward compatible, the top function by default will continue to order in descending order. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)