Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/18543 )
Change subject: IMPALA-11301: Fix extreme != selectivity for NDV=1 ...................................................................... IMPALA-11301: Fix extreme != selectivity for NDV=1 The original selectivity of 1.0 - 1.0/ndv makes sense for large NDVs, but the result is 0.0 in case of ndv==1, which leads to a cardinality of 1 even for huge tables. The new selectivity is 0.5. Note that as the formula for = is not changed (1.0/ndv), NOT col="const" will still lead to 0.0 selectivity if ndv=1. Changing the formula of NOT or = would have caused a lot of subtle changes in plans in tests, so I don't want to touch those before coming to wider agreement about the correct approach. IMPALA-7601 contains some discussion about these formulas. Testing: - added a regression test Change-Id: I6b5334a8d7d6ca46a450ff98ae03e5269faaa3c6 Reviewed-on: http://gerrit.cloudera.org:8080/18543 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M fe/src/main/java/org/apache/impala/analysis/BinaryPredicate.java M fe/src/test/java/org/apache/impala/planner/CardinalityTest.java 2 files changed, 12 insertions(+), 1 deletion(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- 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: merged Gerrit-Change-Id: I6b5334a8d7d6ca46a450ff98ae03e5269faaa3c6 Gerrit-Change-Number: 18543 Gerrit-PatchSet: 6 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]>
