Steve Carlin has uploaded a new patch set (#7). ( http://gerrit.cloudera.org:8080/23035 )
Change subject: IMPALA-14061: ADDENDUM - Fixed the JoinTranspose rule. ...................................................................... IMPALA-14061: ADDENDUM - Fixed the JoinTranspose rule. The JoinTranspose rule provided by Calcite was having 2 issues: 1) For tpcds-q10 and q35, an exception was being thrown. There is a bug in the Calcite code when the Join-Project gets matched but the Join is of reltype SemiJoin. In this case, the Projects do not get created correctly and the exception gets thrown. 2) We only want to transpose a Project above a Join if there is an underlying Join underneath the Project. The whole purpose is to be able to create adjacent Join RelNodes. We do not have to tranpose the Project when it is not sandwiched between two Join nodes. It is preferable to keep it underneath the Join since the row width calculation would be affected (the Project may reduce the number of columns, thus reducing the row width). This commit extends the given JoinProjectTranspose rule by Calcite and handles these added restrictions. Change-Id: Iab987c168703875a9a013fda01c66a8377bec760 --- A java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaJoinProjectTransposeRule.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q04.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q06.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q08.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q11.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q13.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q14a.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q14b.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q17.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q18.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q24a.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q24b.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q25.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q27.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q29.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q31.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q33.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q37.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q45.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q47.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q54.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q56.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q57.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q58.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q60.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q64.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q65.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q72.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q74.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q75.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q82.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q83.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q84.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q85.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q91.test M testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q95.test 37 files changed, 22,723 insertions(+), 24,814 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/35/23035/7 -- To view, visit http://gerrit.cloudera.org:8080/23035 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iab987c168703875a9a013fda01c66a8377bec760 Gerrit-Change-Number: 23035 Gerrit-PatchSet: 7 Gerrit-Owner: Steve Carlin <[email protected]>
