Aman Sinha has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/18543 )

Change subject: IMPALA-11301: Fix extreme = and != selectivity for NDV=1
......................................................................


Patch Set 2: Code-Review+2

(2 comments)

http://gerrit.cloudera.org:8080/#/c/18543/1/fe/src/main/java/org/apache/impala/analysis/BinaryPredicate.java
File fe/src/main/java/org/apache/impala/analysis/BinaryPredicate.java:

http://gerrit.cloudera.org:8080/#/c/18543/1/fe/src/main/java/org/apache/impala/analysis/BinaryPredicate.java@267
PS1, Line 267:     if (distinctValues == 1) distinctValues = 2;
> Yes, and I do think that 0.5 is "more right" than 1.
Yeah the NOT col = 1 is a good use case to justify this.   I am good with it.  
In any case the cardinality will be rounded to the next integer value.


http://gerrit.cloudera.org:8080/#/c/18543/1/fe/src/main/java/org/apache/impala/analysis/BinaryPredicate.java@273
PS1, Line 273:       if (op_ == Operator.DISTINCT_FROM && rChildIsNull) {
> I have changed the patch to only affect ndv=1.
Thanks for making the change to do an explicit check.  The presence or absence 
of a value is not possible to be handled through NDV alone.  If we had 
Histogram or Most Common Values, those keep track of actual values which would 
help.
Marking this resolved.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6b5334a8d7d6ca46a450ff98ae03e5269faaa3c6
Gerrit-Change-Number: 18543
Gerrit-PatchSet: 2
Gerrit-Owner: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Abhishek Rawat <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Gabor Kaszab <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Wed, 18 May 2022 22:37:51 +0000
Gerrit-HasComments: Yes

Reply via email to