Alex Behm has uploaded a new patch set (#2). Change subject: IMPALA-3940: Fix getting column stats through views. ......................................................................
IMPALA-3940: Fix getting column stats through views. The bug: During join ordering we rely on the column stats of join predicates for estimating the join cardinality. We have code that tries to find the stats of a column through views but there was a bug in identifying slots that belong to base table scans. The bug lead us to incorrectly accept slots of view references which do not have stats. This patch fixes the above issue and adds new test infrastructure for creating test-local views. It adds a TPCH-equivalent database that contains views of the form "select * from tpch_basetbl" for all TPCH tables and add tests the plans of all TPCH queries on the view database. Change-Id: Ie3b62a5e7e7d0e84850749108c13991647cedce6 --- M fe/src/main/java/com/cloudera/impala/analysis/SlotDescriptor.java M fe/src/main/java/com/cloudera/impala/catalog/View.java M fe/src/test/java/com/cloudera/impala/analysis/AnalyzeAuthStmtsTest.java M fe/src/test/java/com/cloudera/impala/analysis/AnalyzeDDLTest.java M fe/src/test/java/com/cloudera/impala/analysis/AnalyzerTest.java M fe/src/test/java/com/cloudera/impala/analysis/ToSqlTest.java A fe/src/test/java/com/cloudera/impala/common/FrontendTestBase.java M fe/src/test/java/com/cloudera/impala/planner/PlannerTest.java M fe/src/test/java/com/cloudera/impala/planner/PlannerTestBase.java M testdata/workloads/functional-planner/queries/PlannerTest/joins.test M testdata/workloads/functional-planner/queries/PlannerTest/tpcds-all.test M testdata/workloads/functional-planner/queries/PlannerTest/tpch-all.test A testdata/workloads/functional-planner/queries/PlannerTest/tpch-views.test 13 files changed, 4,710 insertions(+), 588 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/65/3865/2 -- To view, visit http://gerrit.cloudera.org:8080/3865 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie3b62a5e7e7d0e84850749108c13991647cedce6 Gerrit-PatchSet: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Alex Behm <[email protected]>
