Steve Carlin has uploaded a new patch set (#4). ( 
http://gerrit.cloudera.org:8080/23924 )

Change subject: IMPALA-14102: [part 3] Modified LoptOptimizeJoinRule with 
Impala changes
......................................................................

IMPALA-14102: [part 3] Modified LoptOptimizeJoinRule with Impala changes

The first cut of LoptOptimizeJoinRule class was imported from
Calcite 1.37. This had not been used yet but served as a base for
future Impala changes on this class.

This commit provides the changes that are needed for the rule to
allow Impala specific join optimization code. The rule name has
been changed to ImpalaLoptOptimizeJoinRule to underscore that
this is Impala specific code.

There are some basic name changes of variables, methods,
configurations that were changed. There are two main changes
with this commit.

1) The swapInputs() method compares cost models to decide if
   the build side should be swapped with the probe side. The
   Calcite version only looks at top level row counts, but this
   produced some less optimal plans.
2) The CumulativeCost handler is overridden to factor in that
   scan costs need to rely on only the columns fetched from the
   scan, not all of the columns.

Testing: Tpcds queries have been changed. Some JUnit tests have been
added as well.

Change-Id: I168ae903934c5c74520a22605e73f71dc0a9d549
---
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaCoreRules.java
R 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaLoptOptimizeJoinRule.java
A 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaMQContext.java
A 
java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdCumulativeCost.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdNonCumulativeCost.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMetadataProvider.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteRelNodeConverter.java
A 
java/calcite-planner/src/test/java/org/apache/impala/planner/TestLoptJoinRule.java
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q04.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q09.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q23a.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q23b.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q31.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q35a.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q45.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q58.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q61.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q64.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q68.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q69.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q72.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q77.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q81.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q84.test
25 files changed, 9,349 insertions(+), 8,927 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/24/23924/4
--
To view, visit http://gerrit.cloudera.org:8080/23924
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I168ae903934c5c74520a22605e73f71dc0a9d549
Gerrit-Change-Number: 23924
Gerrit-PatchSet: 4
Gerrit-Owner: Steve Carlin <[email protected]>

Reply via email to