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

Carl Steinbach updated HIVE-894:
--------------------------------

          Component/s: UDF
    Affects Version/s:     (was: 0.6.0)
         Release Note:   (was: add udaf max_n, min_n to contrib)
         Hadoop Flags: [Reviewed]
              Summary: Add UDAFs max_n(), min_n() to contrib  (was: add udaf 
max_n, min_n to contrib)

> Add UDAFs max_n(), min_n() to contrib
> -------------------------------------
>
>                 Key: HIVE-894
>                 URL: https://issues.apache.org/jira/browse/HIVE-894
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>             Fix For: 0.6.0
>
>         Attachments: HIVE-894.1.patch, HIVE-894.1.patch, HIVE-894.2.patch, 
> HIVE-894.3.patch
>
>
> These 2 UDAFs should return the max n numbers, min n numbers in order.
> {code}
> SELECT max_n(userid, 3) FROM src;
> [999,997,996]
> SELECT max_n(userid, 3)[1] FROM src;
> 997
> SELECT min_n(userid, 3) FROM src;
> [0, 3, 8]
> SELECT min_n(userid, 3)[2] FROM src;
> 8
> {code}

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

Reply via email to