Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 554F611D69 for ; Tue, 24 Jun 2014 09:35:25 +0000 (UTC) Received: (qmail 21597 invoked by uid 500); 24 Jun 2014 09:35:25 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 21535 invoked by uid 500); 24 Jun 2014 09:35:24 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 21524 invoked by uid 500); 24 Jun 2014 09:35:24 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 21521 invoked by uid 99); 24 Jun 2014 09:35:24 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jun 2014 09:35:24 +0000 Date: Tue, 24 Jun 2014 09:35:24 +0000 (UTC) From: "Damien Carol (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-2597) Repeated key in GROUP BY is erroneously displayed when using DISTINCT MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Damien Carol updated HIVE-2597: ------------------------------- Description: The following query was simplified for illustration purposes. This works correctly: {code:sql} select client_tid, "" as myvalue1, "" as myvalue2 from clients cluster by client_tid {code} The intent here is to produce two empty columns in between data. The following query does not work: {code:sql} select distinct client_tid, "" as myvalue1, "" as myvalue2 from clients cluster by client_tid {code} {noformat} FAILED: Error in semantic analysis: Line 1:44 Repeated key in GROUP BY "" {noformat} The key is not repeated since the aliases were given. Seems like Hive is ignoring the aliases when the "distinct" keyword is specified. was: The following query was simplified for illustration purposes. This works correctly: select client_tid, "" as myvalue1, "" as myvalue2 from clients cluster by client_tid The intent here is to produce two empty columns in between data. The following query does not work: select distinct client_tid, "" as myvalue1, "" as myvalue2 from clients cluster by client_tid FAILED: Error in semantic analysis: Line 1:44 Repeated key in GROUP BY "" The key is not repeated since the aliases were given. Seems like Hive is ignoring the aliases when the "distinct" keyword is specified. > Repeated key in GROUP BY is erroneously displayed when using DISTINCT > --------------------------------------------------------------------- > > Key: HIVE-2597 > URL: https://issues.apache.org/jira/browse/HIVE-2597 > Project: Hive > Issue Type: Bug > Reporter: Alex Rovner > Assignee: Navis > Attachments: HIVE-2597.3.patch.txt, HIVE-2597.4.patch.txt, HIVE-2597.D8967.1.patch, HIVE-2597.D8967.2.patch > > > The following query was simplified for illustration purposes. > This works correctly: > {code:sql} > select client_tid, "" as myvalue1, "" as myvalue2 from clients cluster by client_tid > {code} > The intent here is to produce two empty columns in between data. > The following query does not work: > {code:sql} > select distinct client_tid, "" as myvalue1, "" as myvalue2 from clients cluster by client_tid > {code} > {noformat} > FAILED: Error in semantic analysis: Line 1:44 Repeated key in GROUP BY "" > {noformat} > The key is not repeated since the aliases were given. Seems like Hive is ignoring the aliases when the "distinct" keyword is specified. -- This message was sent by Atlassian JIRA (v6.2#6252)