Steve Carlin has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/24027


Change subject: IMPALA-14436: Calcite planner: Implement single row join 
optimization
......................................................................

IMPALA-14436: Calcite planner: Implement single row join optimization

The original Impala planner has some optimizations for when there is
a single row produced by the right side.

This commit adds code to detect cases where that happens via either an
aggregate that produces one row, a values clause, or a limit 1 condition.

If detected, the Join Node is produced in accordance to what is expected
by the original planner.

Testing: added a basic test in Calcite planner. This code also changes
a join in tpcds q23a

Change-Id: I4e5f9be67a775a771c0868ac4407410385e8a755

tmp

Change-Id: Ibe677416de57d2767176d22914dcc13a25f45b9b
---
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaAggRel.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaJoinRel.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/phys/ImpalaNestedLoopJoinNode.java
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-q23a.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q23b.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-q54.test
M testdata/workloads/functional-query/queries/QueryTest/calcite.test
11 files changed, 180 insertions(+), 74 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/27/24027/1
--
To view, visit http://gerrit.cloudera.org:8080/24027
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe677416de57d2767176d22914dcc13a25f45b9b
Gerrit-Change-Number: 24027
Gerrit-PatchSet: 1
Gerrit-Owner: Steve Carlin <[email protected]>

Reply via email to