Riza Suminto has uploaded this change for review. ( http://gerrit.cloudera.org:8080/21516
Change subject: IMPALA-13077: Fix selectivity estimation for SEMI JOIN ...................................................................... IMPALA-13077: Fix selectivity estimation for SEMI JOIN JoinNode.getSemiJoinCardinality() will skip an equality expression if either NDV or Cardinality of equality expression is unknown (-1). If NDV is unknown, but Cardinality is known, getSemiJoinCardinality() should assume NDV = Cardinality. On the other hand, assume NDV = 1 if that NDV is being used as a divisor in the selectivity formula to prevent underestimation. Testing: - Add test case where LEFT SEMI JOIN from subquery can reduce cardinality estimate of leftmost ScanNode in the query plan. - Pass core tests. Change-Id: I9c799df535d764c3f87ededef1c48eaa103293a0 --- M fe/src/main/java/org/apache/impala/planner/JoinNode.java M testdata/workloads/functional-planner/queries/PlannerTest/runtime-filter-propagation.test M testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test 3 files changed, 59 insertions(+), 14 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/16/21516/1 -- To view, visit http://gerrit.cloudera.org:8080/21516 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9c799df535d764c3f87ededef1c48eaa103293a0 Gerrit-Change-Number: 21516 Gerrit-PatchSet: 1 Gerrit-Owner: Riza Suminto <[email protected]>
