Return-Path: Delivered-To: apmail-hadoop-hive-dev-archive@minotaur.apache.org Received: (qmail 3354 invoked from network); 17 Jul 2009 22:15:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Jul 2009 22:15:34 -0000 Received: (qmail 31535 invoked by uid 500); 17 Jul 2009 22:16:39 -0000 Delivered-To: apmail-hadoop-hive-dev-archive@hadoop.apache.org Received: (qmail 31509 invoked by uid 500); 17 Jul 2009 22:16:39 -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 31499 invoked by uid 99); 17 Jul 2009 22:16:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jul 2009 22:16:39 +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; Fri, 17 Jul 2009 22:16:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6BF8C234C045 for ; Fri, 17 Jul 2009 15:16:15 -0700 (PDT) Message-ID: <619170955.1247868975440.JavaMail.jira@brutus> Date: Fri, 17 Jul 2009 15:16:15 -0700 (PDT) From: "Ashish Thusoo (JIRA)" To: hive-dev@hadoop.apache.org Subject: [jira] Commented: (HIVE-647) SORT BY with GROUP ignored without LIMIT In-Reply-To: <1481500055.1247777836939.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-647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12732756#action_12732756 ] Ashish Thusoo commented on HIVE-647: ------------------------------------ I think what Bill is saying is that order by DOES NOT use 1 reducer in his tests. That seems to be a bug to me. > SORT BY with GROUP ignored without LIMIT > ---------------------------------------- > > Key: HIVE-647 > URL: https://issues.apache.org/jira/browse/HIVE-647 > Project: Hadoop Hive > Issue Type: Bug > Components: Query Processor > Reporter: Bill Graham > > For queries with GROUP BY and SORT BY, the sort is not handled properly when a LIMIT is not supplied. If I run the following two queries, the first returns properly sorted results. The second does not. > SELECT user, SUM(numRequests) AS num FROM MyTable GROUP BY user SORT BY num DESC LIMIT 50; > SELECT user, SUM(numRequests) AS num FROM MyTable GROUP BY user SORT BY num DESC; > Explain is different for the two queries as well. The first uses 3 M/R jobs and the second only uses 2, which might be part of the problem. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.