Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DDF89200CE0 for ; Fri, 25 Aug 2017 16:52:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DA75616C0B3; Fri, 25 Aug 2017 14:52:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2D65B16C040 for ; Fri, 25 Aug 2017 16:52:06 +0200 (CEST) Received: (qmail 28994 invoked by uid 500); 25 Aug 2017 14:52:05 -0000 Mailing-List: contact issues-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 issues@hive.apache.org Received: (qmail 28906 invoked by uid 99); 25 Aug 2017 14:52:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Aug 2017 14:52:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 0FF84180CB6 for ; Fri, 25 Aug 2017 14:52:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id QvF2UpyjytYI for ; Fri, 25 Aug 2017 14:52:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 0E37760D9B for ; Fri, 25 Aug 2017 14:52:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 631B9E028F for ; Fri, 25 Aug 2017 14:52:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 101952537F for ; Fri, 25 Aug 2017 14:52:00 +0000 (UTC) Date: Fri, 25 Aug 2017 14:52:00 +0000 (UTC) From: "Khaja Hussain (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-17390) Select count(distinct) returns incorrect results using tez MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 25 Aug 2017 14:52:07 -0000 [ https://issues.apache.org/jira/browse/HIVE-17390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16141708#comment-16141708 ] Khaja Hussain commented on HIVE-17390: -------------------------------------- Thanks Brian for filing the bug. > Select count(distinct) returns incorrect results using tez > ---------------------------------------------------------- > > Key: HIVE-17390 > URL: https://issues.apache.org/jira/browse/HIVE-17390 > Project: Hive > Issue Type: Bug > Components: Query Planning > Affects Versions: 1.2.1 > Reporter: Brian Goerlitz > > With the following combination of settings, select count(distinct) will return the results of select sum(distinct). > hive.execution.engine=tez > hive.optimize.reducededuplication=true > hive.optimize.reducededuplication.min.reducer=1 > hive.optimize.distinct.rewrite=true > hive.groupby.skewindata=false > hive.vectorized.execution.reduce.enabled=true > STEPS TO REPRODUCE: > {quote}CREATE TABLE `simple_data`(ppmonth int, sale double); > INSERT INTO simple_data VALUES (501,25000.0),(502,60000.0),(501,40000.0),(502,70000.0),(501,35000.0),(502,60000.0); > set hive.execution.engine=tez; > set hive.optimize.reducededuplication=true; > set hive.optimize.reducededuplication.min.reducer=1; > set hive.optimize.distinct.rewrite=true; > set hive.groupby.skewindata=false; > set hive.vectorized.execution.reduce.enabled=true; > select count(distinct ppmonth) from simple_data;{quote} > Returns 1003 rather than 2 -- This message was sent by Atlassian JIRA (v6.4.14#64029)