Anonymous Coward (816) has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24261 )

Change subject: IMPALA-14849: Upgrade Calcite planner to 1.42
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/24261/3/tests/query_test/test_spilling.py
File tests/query_test/test_spilling.py:

http://gerrit.cloudera.org:8080/#/c/24261/3/tests/query_test/test_spilling.py@115
PS3, Line 115:   @SkipIfCalcite.spilling_plan_different
> That's a bit concerning.
The ideal outcome is that for such SQL queries, the Calcite path should also be 
able to generate a NULL AWARE LEFT ANTI JOIN? plan.

SELECT COUNT(*) AS c
FROM emp AS e
WHERE sal + 100 NOT IN (
  SELECT deptno
  FROM dept
);

We could add a phase after the "Plan after conversion from Abstract Syntax 
Tree"? but before the "Plan after subquery removal phase"? to produce a plan 
similar to the following Spark plan:

== Optimized Logical Plan ==
Aggregate [count(1) AS c#36L]
+- Project
   +- Join LeftAnti, (((sal#22 + 100.0) = deptno#43) OR isnull(((sal#22 + 
100.0) = deptno#43)))
      :- Project [sal#22]
      :  +- Relation 
spark_catalog.default.emp[empno#16,ename#17,job#18,age#19,mgr#20,hiredate#21,sal#22,comm#23,deptno#24,email#25,create_datetime#26,upsert_time#27]
 parquet
      +- Project [cast(deptno#28 as double) AS deptno#43]
         +- Relation spark_catalog.default.dept[deptno#28,dname#29,loc#30] 
parquet

Based on this logical plan, it can then be converted into a NULL AWARE LEFT 
ANTI JOIN? in the subsequent phases, such as runImpalaConvertProgram.



--
To view, visit http://gerrit.cloudera.org:8080/24261
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4bfb3271282f3dfdd250fa61bce1492e5dd499f8
Gerrit-Change-Number: 24261
Gerrit-PatchSet: 3
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Anonymous Coward (816)
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>
Gerrit-Reviewer: Xuebin Su <[email protected]>
Gerrit-Comment-Date: Tue, 09 Jun 2026 07:42:45 +0000
Gerrit-HasComments: Yes

Reply via email to