impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-2250: Make multiple COUNT(DISTINCT) message state workarounds
Date Wed, 22 Nov 2017 05:30:51 GMT
Alex Behm has posted comments on this change. ( http://gerrit.cloudera.org:8080/8614 )

Change subject: IMPALA-2250: Make multiple COUNT(DISTINCT) message state workarounds
......................................................................


Patch Set 3:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/8614/3/fe/src/main/java/org/apache/impala/analysis/AggregateInfo.java
File fe/src/main/java/org/apache/impala/analysis/AggregateInfo.java:

http://gerrit.cloudera.org:8080/#/c/8614/3/fe/src/main/java/org/apache/impala/analysis/AggregateInfo.java@249
PS3, Line 249:         if (distinctAggExprs.get(i).getFnName().getFunction().equalsIgnoreCase(
             :             "count")) {
> Conversion to NDV() is only available for the case: COUNT(DISTINCT).
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.alltypes


http://gerrit.cloudera.org:8080/#/c/8614/3/fe/src/main/java/org/apache/impala/analysis/AggregateInfo.java@252
PS3, Line 252:             + distinctAggExprs.get(i).getChild(0).toSql()
             :             + ") instead of " + distinctAggExprs.get(i).toSql() + " if estimated
"
> I think it is better to show a specific object instead of constant.
What about this:

select avg(distinct x), group_concat(distinct y)

I still prefer my proposed version with a generic count(distinct)



-- 
To view, visit http://gerrit.cloudera.org:8080/8614
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5084be10946d68f3ec0760c2b7e698635df26a89
Gerrit-Change-Number: 8614
Gerrit-PatchSet: 3
Gerrit-Owner: Kim Jin Chul <jinchul@gmail.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Kim Jin Chul <jinchul@gmail.com>
Gerrit-Comment-Date: Wed, 22 Nov 2017 05:30:51 +0000
Gerrit-HasComments: Yes

Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message