Return-Path: Delivered-To: apmail-hadoop-hive-dev-archive@minotaur.apache.org Received: (qmail 54809 invoked from network); 31 Dec 2009 03:05:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Dec 2009 03:05:54 -0000 Received: (qmail 41207 invoked by uid 500); 31 Dec 2009 03:05:54 -0000 Delivered-To: apmail-hadoop-hive-dev-archive@hadoop.apache.org Received: (qmail 41166 invoked by uid 500); 31 Dec 2009 03:05:52 -0000 Mailing-List: contact hive-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hadoop.apache.org Delivered-To: mailing list hive-dev@hadoop.apache.org Received: (qmail 41148 invoked by uid 99); 31 Dec 2009 03:05:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Dec 2009 03:05:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Dec 2009 03:05:50 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CF199234C045 for ; Wed, 30 Dec 2009 19:05:29 -0800 (PST) Message-ID: <1655021538.1262228729834.JavaMail.jira@brutus.apache.org> Date: Thu, 31 Dec 2009 03:05:29 +0000 (UTC) From: "Bill Jia (JIRA)" To: hive-dev@hadoop.apache.org Subject: [jira] Updated: (HIVE-894) add udaf max_n, min_n to contrib In-Reply-To: <375385666.1256080200645.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HIVE-894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bill Jia updated HIVE-894: -------------------------- Attachment: HIVE-894.1.patch max_n and min_n added. > add udaf max_n, min_n to contrib > -------------------------------- > > Key: HIVE-894 > URL: https://issues.apache.org/jira/browse/HIVE-894 > Project: Hadoop Hive > Issue Type: New Feature > Reporter: Zheng Shao > Attachments: HIVE-894.1.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.