Qifan Chen has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/17344 )

Change subject: IMPALA-10677: Set selectivity of Not-equal
......................................................................


Patch Set 1:

(3 comments)

Looks good!

http://gerrit.cloudera.org:8080/#/c/17344/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/17344/1/fe/src/main/java/org/apache/impala/analysis/BinaryPredicate.java@244
PS1, Line 244: distinctValues > 0
This condition can be checked at the beginning together with 
!isSingleColumnPredicate().

If distinctValues == 0, should we set the selectivity_ to 0 for both EQ and NE 
case?


http://gerrit.cloudera.org:8080/#/c/17344/1/fe/src/main/java/org/apache/impala/analysis/BinaryPredicate.java@249
PS1, Line 249: selectivity_ = Math.max(0, Math.min(1, selectivity_));
Repetition in both then and else branch.


http://gerrit.cloudera.org:8080/#/c/17344/1/fe/src/test/java/org/apache/impala/analysis/ExprCardinalityTest.java
File fe/src/test/java/org/apache/impala/analysis/ExprCardinalityTest.java:

http://gerrit.cloudera.org:8080/#/c/17344/1/fe/src/test/java/org/apache/impala/analysis/ExprCardinalityTest.java@316
PS1, Line 316: testNeSelectivity
May add a couple test cases for an empty table.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Icd6f5945840ea2a8194d72aa440ddfa6915cbb3a
Gerrit-Change-Number: 17344
Gerrit-PatchSet: 1
Gerrit-Owner: liuyao <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Qifan Chen <[email protected]>
Gerrit-Comment-Date: Tue, 27 Apr 2021 17:33:33 +0000
Gerrit-HasComments: Yes

Reply via email to