Riza Suminto has uploaded this change for review. ( http://gerrit.cloudera.org:8080/21005
Change subject: IMPALA-12790: Fix overestimation in ScanNode.getInputCardinality ...................................................................... IMPALA-12790: Fix overestimation in ScanNode.getInputCardinality ScanNode.getInputCardinality() can overestimate if LIMIT is large. If table cardinality stats exist and it is less than the LIMIT, then the table cardinality should be returned. On the other hand, if table cardinality stats does not exist, Planner might extrapolate it and result in underestimated input cardinality. In this case, MaxRowsProcessedVisitor should fall back to the maximum between extrapolated input cardinality and LIMIT. This patch adds those fixes and more test cases under data-source-tables.test. This also moves tests added by IMPALA-5602 to data-source-tables.test since only PlannerTest.testSmallQueryOptimization runs with EXEC_SINGLE_NODE_ROWS_THRESHOLD > 0. Testing: - Pass FE tests. Change-Id: Icc5b39a7684fb8748185349d0b80baf8dcd6b126 --- M fe/src/main/java/org/apache/impala/planner/ScanNode.java M fe/src/main/java/org/apache/impala/util/MaxRowsProcessedVisitor.java M fe/src/test/java/org/apache/impala/planner/PlannerTest.java M testdata/workloads/functional-planner/queries/PlannerTest/data-source-tables.test M testdata/workloads/functional-planner/queries/PlannerTest/kudu.test M testdata/workloads/functional-planner/queries/PlannerTest/small-query-opt.test M testdata/workloads/functional-planner/queries/PlannerTest/tpcds-processing-cost.test 7 files changed, 299 insertions(+), 59 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/05/21005/1 -- To view, visit http://gerrit.cloudera.org:8080/21005 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Icc5b39a7684fb8748185349d0b80baf8dcd6b126 Gerrit-Change-Number: 21005 Gerrit-PatchSet: 1 Gerrit-Owner: Riza Suminto <[email protected]>
