@@ -3665,25 +3665,19 @@ WHERE salary > ANY (SELECT salary FROM emp WHERE id <= 3);
36653665----
36663666logical_plan
3667366701)Projection: emp.id
3668- 02)--LeftMark Join: Filter: emp.salary > __correlated_sq_3 .salary IS TRUE
3668+ 02)--LeftMark Join: Filter: emp.salary > __correlated_sq_2 .salary IS NULL
3669366903)----Projection: emp.id, emp.salary
3670- 04)------LeftMark Join: Filter: emp.salary > __correlated_sq_2.salary IS NULL
3671- 05)--------Projection: emp.id, emp.salary
3672- 06)----------Filter: __correlated_sq_1.mark
3673- 07)------------LeftMark Join: Filter: emp.salary > __correlated_sq_1.salary IS TRUE
3674- 08)--------------TableScan: emp projection=[id, salary]
3675- 09)--------------SubqueryAlias: __correlated_sq_1
3676- 10)----------------Projection: emp.salary
3677- 11)------------------Filter: emp.id <= Int32(3)
3678- 12)--------------------TableScan: emp projection=[id, salary]
3679- 13)--------SubqueryAlias: __correlated_sq_2
3680- 14)----------Projection: emp.salary
3681- 15)------------Filter: emp.id <= Int32(3)
3682- 16)--------------TableScan: emp projection=[id, salary]
3683- 17)----SubqueryAlias: __correlated_sq_3
3684- 18)------Projection: emp.salary
3685- 19)--------Filter: emp.id <= Int32(3)
3686- 20)----------TableScan: emp projection=[id, salary]
3670+ 04)------Filter: __correlated_sq_1.mark IS NOT DISTINCT FROM Boolean(true)
3671+ 05)--------LeftMark Join: Filter: emp.salary > __correlated_sq_1.salary IS TRUE
3672+ 06)----------TableScan: emp projection=[id, salary]
3673+ 07)----------SubqueryAlias: __correlated_sq_1
3674+ 08)------------Projection: emp.salary
3675+ 09)--------------Filter: emp.id <= Int32(3)
3676+ 10)----------------TableScan: emp projection=[id, salary]
3677+ 11)----SubqueryAlias: __correlated_sq_2
3678+ 12)------Projection: emp.salary
3679+ 13)--------Filter: emp.id <= Int32(3)
3680+ 14)----------TableScan: emp projection=[id, salary]
36873681
36883682query I
36893683SELECT id
@@ -3702,25 +3696,21 @@ WHERE salary > ALL (SELECT salary FROM emp WHERE id <= 2);
37023696----
37033697logical_plan
3704369801)Projection: emp.id
3705- 02)--Filter: NOT __correlated_sq_3 .mark
3706- 03)----Projection: emp.id, __correlated_sq_3 .mark
3707- 04)------LeftMark Join: Filter: emp.salary > __correlated_sq_3 .salary IS NULL
3699+ 02)--Filter: __correlated_sq_2 .mark IS DISTINCT FROM Boolean(true)
3700+ 03)----Projection: emp.id, __correlated_sq_2 .mark
3701+ 04)------LeftMark Join: Filter: emp.salary > __correlated_sq_2 .salary IS NULL
3708370205)--------Projection: emp.id, emp.salary
3709- 06)----------LeftMark Join: Filter: emp.salary > __correlated_sq_2.salary IS NULL
3710- 07)------------LeftAnti Join: Filter: emp.salary > __correlated_sq_1.salary IS FALSE
3703+ 06)----------Filter: __correlated_sq_1.mark IS DISTINCT FROM Boolean(true)
3704+ 07)------------LeftMark Join: Filter: emp.salary > __correlated_sq_1.salary IS FALSE
3711370508)--------------TableScan: emp projection=[id, salary]
3712370609)--------------SubqueryAlias: __correlated_sq_1
3713370710)----------------Projection: emp.salary
3714370811)------------------Filter: emp.id <= Int32(2)
3715370912)--------------------TableScan: emp projection=[id, salary]
3716- 13)------------SubqueryAlias: __correlated_sq_2
3717- 14)--------------Projection: emp.salary
3718- 15)----------------Filter: emp.id <= Int32(2)
3719- 16)------------------TableScan: emp projection=[id, salary]
3720- 17)--------SubqueryAlias: __correlated_sq_3
3721- 18)----------Projection: emp.salary
3722- 19)------------Filter: emp.id <= Int32(2)
3723- 20)--------------TableScan: emp projection=[id, salary]
3710+ 13)--------SubqueryAlias: __correlated_sq_2
3711+ 14)----------Projection: emp.salary
3712+ 15)------------Filter: emp.id <= Int32(2)
3713+ 16)--------------TableScan: emp projection=[id, salary]
37243714
37253715query I
37263716SELECT id
@@ -3737,25 +3727,19 @@ WHERE salary = ANY (SELECT salary FROM emp WHERE id <= 2);
37373727----
37383728logical_plan
3739372901)Projection: emp.id
3740- 02)--LeftMark Join: Filter: emp.salary = __correlated_sq_3 .salary IS TRUE
3730+ 02)--LeftMark Join: Filter: emp.salary = __correlated_sq_2 .salary IS NULL
3741373103)----Projection: emp.id, emp.salary
3742- 04)------LeftMark Join: Filter: emp.salary = __correlated_sq_2.salary IS NULL
3743- 05)--------Projection: emp.id, emp.salary
3744- 06)----------Filter: __correlated_sq_1.mark
3745- 07)------------LeftMark Join: Filter: emp.salary = __correlated_sq_1.salary IS TRUE
3746- 08)--------------TableScan: emp projection=[id, salary]
3747- 09)--------------SubqueryAlias: __correlated_sq_1
3748- 10)----------------Projection: emp.salary
3749- 11)------------------Filter: emp.id <= Int32(2)
3750- 12)--------------------TableScan: emp projection=[id, salary]
3751- 13)--------SubqueryAlias: __correlated_sq_2
3752- 14)----------Projection: emp.salary
3753- 15)------------Filter: emp.id <= Int32(2)
3754- 16)--------------TableScan: emp projection=[id, salary]
3755- 17)----SubqueryAlias: __correlated_sq_3
3756- 18)------Projection: emp.salary
3757- 19)--------Filter: emp.id <= Int32(2)
3758- 20)----------TableScan: emp projection=[id, salary]
3732+ 04)------Filter: __correlated_sq_1.mark IS NOT DISTINCT FROM Boolean(true)
3733+ 05)--------LeftMark Join: Filter: emp.salary = __correlated_sq_1.salary IS TRUE
3734+ 06)----------TableScan: emp projection=[id, salary]
3735+ 07)----------SubqueryAlias: __correlated_sq_1
3736+ 08)------------Projection: emp.salary
3737+ 09)--------------Filter: emp.id <= Int32(2)
3738+ 10)----------------TableScan: emp projection=[id, salary]
3739+ 11)----SubqueryAlias: __correlated_sq_2
3740+ 12)------Projection: emp.salary
3741+ 13)--------Filter: emp.id <= Int32(2)
3742+ 14)----------TableScan: emp projection=[id, salary]
37593743
37603744statement ok
37613745DROP TABLE emp;
0 commit comments