Hello Paul Rogers, Yifan Zhang, Michael Smith, Steve Carlin, Csaba Ringhofer,
Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24597
to look at the new patch set (#4).
Change subject: IMPALA-7996: Optimize constant-false outer joins
......................................................................
IMPALA-7996: Optimize constant-false outer joins
Constant FALSE or NULL ON conjuncts eliminate usable equi-join
predicates during expression rewriting. The classic planner then
chooses a nested-loop join although the join cannot produce a match.
Add a synthetic non-matching hash predicate for outer joins and drop
redundant remaining ON conjuncts. Replace the non-preserved input of
left and right outer joins with EmptySetNode.
Broadcast the empty build for constant-false left outer joins, even
with a SHUFFLE hint. Invert right outer joins so their empty input also
becomes the broadcast build. Keep full outer joins partitioned and use
random distribution on both inputs to avoid constant-key skew.
Add planner coverage for single-node and distributed plans with
literal, folded, and typed NULL predicates. Add query tests with
constant inline views to verify preserved-side row counts.
Change-Id: I6505825fc958720eec12e13d546661834f221b80
Assisted-by: gpt-5.6-sol (OpenAI Codex)
---
M fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java
M fe/src/main/java/org/apache/impala/planner/HashJoinNode.java
M fe/src/main/java/org/apache/impala/planner/Planner.java
M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
M testdata/workloads/functional-planner/queries/PlannerTest/empty.test
M testdata/workloads/functional-query/queries/QueryTest/outer-joins.test
6 files changed, 189 insertions(+), 36 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/97/24597/4
--
To view, visit http://gerrit.cloudera.org:8080/24597
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6505825fc958720eec12e13d546661834f221b80
Gerrit-Change-Number: 24597
Gerrit-PatchSet: 4
Gerrit-Owner: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Paul Rogers <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>
Gerrit-Reviewer: Yifan Zhang <[email protected]>