wangsheng has uploaded a new patch set (#5). ( http://gerrit.cloudera.org:8080/18829 )
Change subject: IMPALA-7942 (part 1): Add query hints for table cardinalities ...................................................................... IMPALA-7942 (part 1): Add query hints for table cardinalities Currently, We need execute 'COMPUTE STATS' manually to compute table stats info. Stats is very useful for query planning. Without these stats, query plan maybe worse. In order to solve this probelm, this patch adds a new query hint: 'TABLE_NUM_ROWS', We can use this new hint after a hdfs or kudu table in query like this: * select col from t /* +TABLE_NUM_ROWS(1000) */; If set, Impala will use this value as table scanned rows when table no stats or has corrput stats. This hint value will not valid if table stats is normal. Testing: - Added new fe test in 'PlannerTest' - Added new fe test in 'AnalyzeStmtsTest' for negative cases Change-Id: I9f0c773f4e67782a1428db64062f68afbd257af7 --- M fe/src/main/java/org/apache/impala/analysis/TableRef.java M fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java M fe/src/main/java/org/apache/impala/planner/KuduScanNode.java M fe/src/main/java/org/apache/impala/planner/ScanNode.java M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java M fe/src/test/java/org/apache/impala/analysis/AnalyzeStmtsTest.java M fe/src/test/java/org/apache/impala/planner/PlannerTest.java A testdata/workloads/functional-planner/queries/PlannerTest/table-cardinality-hint.test 8 files changed, 160 insertions(+), 10 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/29/18829/5 -- To view, visit http://gerrit.cloudera.org:8080/18829 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9f0c773f4e67782a1428db64062f68afbd257af7 Gerrit-Change-Number: 18829 Gerrit-PatchSet: 5 Gerrit-Owner: wangsheng <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Fucun Chu <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: wangsheng <[email protected]>
