Qifan Chen has posted comments on this change. ( http://gerrit.cloudera.org:8080/17344 )
Change subject: IMPALA-7560: Set selectivity of Not-equal ...................................................................... Patch Set 6: (2 comments) Looks very good to me! http://gerrit.cloudera.org:8080/#/c/17344/6/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/6/fe/src/main/java/org/apache/impala/analysis/BinaryPredicate.java@256 PS6, Line 256: selectivity_ = 1.0 / distinctValues; I think if we have null stats, the selectivity for EQ case should be computed as follows. Let N = num nulls, and M = num of not nulls. Selectivity = (M/distinctValues) / (M + N) http://gerrit.cloudera.org:8080/#/c/17344/6/fe/src/main/java/org/apache/impala/analysis/BinaryPredicate.java@258 PS6, Line 258: if nit. May add a comment here: For case <column> IS DISTINCT FROM NULL -- 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: 6 Gerrit-Owner: liuyao <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Qifan Chen <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]> Gerrit-Reviewer: liuyao <[email protected]> Gerrit-Comment-Date: Mon, 21 Jun 2021 17:40:42 +0000 Gerrit-HasComments: Yes
