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 D48C9D4DA for ; Thu, 28 Jun 2012 03:51:48 +0000 (UTC) Received: (qmail 92154 invoked by uid 500); 28 Jun 2012 03:51:47 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 91865 invoked by uid 500); 28 Jun 2012 03:51:47 -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 91626 invoked by uid 500); 28 Jun 2012 03:51:46 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 91571 invoked by uid 99); 28 Jun 2012 03:51:45 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jun 2012 03:51:45 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 06773142849 for ; Thu, 28 Jun 2012 03:51:44 +0000 (UTC) Date: Thu, 28 Jun 2012 03:51:44 +0000 (UTC) From: "Edward Capriolo (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: <1378265806.65274.1340855504028.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1282154692.55596.1339209802849.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (HIVE-3108) SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column 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-3108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402814#comment-13402814 ] Edward Capriolo commented on HIVE-3108: --------------------------------------- Confirmed fixed in trunk. {noformat} [edward@tablitha dist]$ bin/hive Logging initialized using configuration in jar:file:/home/edward/hive/trunk/build/dist/lib/hive-common-0.10.0-SNAPSHOT.jar!/hive-log4j.properties Hive history file=/tmp/edward/hive_job_log_edward_201206272349_386020253.txt hive> create table stocks (x int, y string) partitioned by (exchange string, symbol string); OK Time taken: 17.382 seconds hive> alter table stocks add partition (exchange='nasdaq', symbol='ed'); OK Time taken: 2.022 seconds hive> alter table stocks add partition (exchange='nasdaq', symbol='guy'); OK Time taken: 0.219 seconds hive> alter table stocks add partition (exchange='jp', symbol='bla'); OK Time taken: 0.245 seconds hive> select count(distinct exchange), count(distinct symbol) from stocks; 2 3 Time taken: 5.742 seconds {noformat} > SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column > ----------------------------------------------------------------------- > > Key: HIVE-3108 > URL: https://issues.apache.org/jira/browse/HIVE-3108 > Project: Hive > Issue Type: Bug > Components: Query Processor > Affects Versions: 0.8.0, 0.9.0 > Environment: Mac OSX running Apache distribution of hadoop and hive natively. > Reporter: Dean Wampler > Labels: Hive > > Suppose "stocks" is a managed OR external table, partitioned by "exchange" and "symbol". "count(DISTINCT x)" returns 0 for either "exchange", "symbol", or both: > hive> SELECT count(DISTINCT exchange), count(DISTINCT symbol) from stocks; > 0 0 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira