Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/24441 )
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]> Reviewed-on: http://gerrit.cloudera.org:8080/24441 Reviewed-by: Impala Public Jenkins <[email protected]> Reviewed-by: Jason Fehr <[email protected]> Tested-by: Impala Public Jenkins <[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, 105 insertions(+), 1 deletion(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified Jason Fehr: Looks good to me, but someone else must approve -- 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: merged Gerrit-Change-Id: Ia1737b63765471f155eba268b5798b18277b7733 Gerrit-Change-Number: 24441 Gerrit-PatchSet: 5 Gerrit-Owner: Zoltan Borok-Nagy <[email protected]> Gerrit-Reviewer: Balazs Hevele <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jason Fehr <[email protected]> Gerrit-Reviewer: Peter Rozsa <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
