Hello Steve Carlin, Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/24441

to look at the new patch set (#2).

Change subject: IMPALA-14685: Fix incorrect outer-to-inner join conversion with 
NOT predicates
......................................................................

IMPALA-14685: Fix incorrect outer-to-inner join conversion with NOT predicates

The outer-to-inner join transformation incorrectly converted LEFT OUTER
JOINs to INNER JOINs when the WHERE clause contained negated conjunctive
predicates like NOT(t1.col = val AND t2.col = val). This is equivalent to
(t1.col != val OR t2.col != val) via De Morgan's law, which does NOT
prove the nullable side is non-null (t2 can be all-NULL while the OR is
satisfied by the t1 operand).

The fix calls Expr.pushNegationToOperands() at the top of
isNullableConjunct() so that NOT(A AND B) is transformed to
(NOT A) OR (NOT B) before the existing OR-detection logic runs.

Testing:
 * Added e2e tests verifying the join is not converted
 * Added planner tests verifying the plan retains LEFT OUTER JOIN

Change-Id: Ia1737b63765471f155eba268b5798b18277b7733
Assisted-by: Claude Opus 4.6 <[email protected]>
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M 
testdata/workloads/functional-planner/queries/PlannerTest/outer-to-inner-joins.test
M 
testdata/workloads/functional-query/queries/QueryTest/outer-to-inner-joins.test
3 files changed, 74 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/41/24441/2
--
To view, visit http://gerrit.cloudera.org:8080/24441
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia1737b63765471f155eba268b5798b18277b7733
Gerrit-Change-Number: 24441
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>

Reply via email to