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 D5099200D4F for ; Wed, 22 Nov 2017 06:30:57 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D38AB160C0E; Wed, 22 Nov 2017 05:30:57 +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 2468D160BFC for ; Wed, 22 Nov 2017 06:30:56 +0100 (CET) Received: (qmail 71837 invoked by uid 500); 22 Nov 2017 05:30:56 -0000 Mailing-List: contact reviews-help@impala.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.apache.org Received: (qmail 71824 invoked by uid 99); 22 Nov 2017 05:30:55 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Nov 2017 05:30:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 2B91E1A0D22 for ; Wed, 22 Nov 2017 05:30:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.362 X-Spam-Level: ** X-Spam-Status: No, score=2.362 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id HYAju5qhFB-E for ; Wed, 22 Nov 2017 05:30:53 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 80C255F476 for ; Wed, 22 Nov 2017 05:30:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id vAM5UpEg025146; Wed, 22 Nov 2017 05:30:51 GMT Message-Id: <201711220530.vAM5UpEg025146@ip-10-146-233-104.ec2.internal> X-Gerrit-PatchSet: 3 Date: Wed, 22 Nov 2017 05:30:51 +0000 From: "Alex Behm (Code Review)" To: Kim Jin Chul , impala-cr@cloudera.com, reviews@impala.incubator.apache.org X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-2250=3A_Make_multiple_COUNT=28DISTINCT=29_message_state_workarounds=0A?= X-Gerrit-Change-Id: I5084be10946d68f3ec0760c2b7e698635df26a89 X-Gerrit-Change-Number: 8614 X-Gerrit-ChangeURL: X-Gerrit-Commit: eb4678a8936145f397734861bab831f9a147f100 In-Reply-To: References: X-Gerrit-Comment-Date: Wed, 22 Nov 2017 05:30:51 +0000 Reply-To: alex.behm@cloudera.com, impala-cr@cloudera.com, marcelk@gmail.com, reviews@impala.incubator.apache.org, jinchul@gmail.com MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.14.2 Content-Type: multipart/alternative; boundary="okcfpUlzcmE="; charset=UTF-8 archived-at: Wed, 22 Nov 2017 05:30:58 -0000 --okcfpUlzcmE= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Alex Behm has posted comments on this change=2E ( http://gerrit=2Ecloudera= =2Eorg:8080/8614 ) Change subject: IMPALA-2250: Make multiple COUNT(DISTIN= CT) message state workarounds =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E= =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E= =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E= =2E=2E=2E=2E=2E Patch Set 3: (2 comments) http://gerrit=2Ecloudera=2Eor= g:8080/#/c/8614/3/fe/src/main/java/org/apache/impala/analysis/AggregateInfo= =2Ejava File fe/src/main/java/org/apache/impala/analysis/AggregateInfo=2Eja= va: http://gerrit=2Ecloudera=2Eorg:8080/#/c/8614/3/fe/src/main/java/org/ap= ache/impala/analysis/AggregateInfo=2Ejava@249 PS3, Line 249: if (di= stinctAggExprs=2Eget(i)=2EgetFnName()=2EgetFunction()=2EequalsIgnoreCase( = : "count")) { > Conversion to NDV() is only availab= le for the case: COUNT(DISTINCT)=2E That's correct, but that error message = is also thrown for non-count(distinct) aggregation functions like: select = avg(distinct int_col), group_concat(distinct string_col) from functional=2E= alltypes http://gerrit=2Ecloudera=2Eorg:8080/#/c/8614/3/fe/src/main/java/= org/apache/impala/analysis/AggregateInfo=2Ejava@252 PS3, Line 252: = + distinctAggExprs=2Eget(i)=2EgetChild(0)=2EtoSql() : = + ") instead of " + distinctAggExprs=2Eget(i)=2EtoSql() + " if esti= mated " > I think it is better to show a specific object instead of constan= t=2E What about this: select avg(distinct x), group_concat(distinct y) I = still prefer my proposed version with a generic count(distinct) -- To v= iew, visit http://gerrit=2Ecloudera=2Eorg:8080/8614 To unsubscribe, visit h= ttp://gerrit=2Ecloudera=2Eorg:8080/settings Gerrit-Project: Impala-ASF Ger= rit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5084be109= 46d68f3ec0760c2b7e698635df26a89 Gerrit-Change-Number: 8614 Gerrit-PatchSet:= 3 Gerrit-Owner: Kim Jin Chul Gerrit-Reviewer: Alex B= ehm Gerrit-Reviewer: Kim Jin Chul Gerrit-Comment-Date: Wed, 22 Nov 2017 05:30:51 +0000 Gerrit-HasCo= mments: Yes --okcfpUlzcmE=--