Skip to content

Commit 0202867

Browse files
committed
fix tests
Signed-off-by: Adam Gutglick <[email protected]>
1 parent cb4e0db commit 0202867

1 file changed

Lines changed: 33 additions & 49 deletions

File tree

‎datafusion/sqllogictest/test_files/subquery.slt‎

Lines changed: 33 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -3665,25 +3665,19 @@ WHERE salary > ANY (SELECT salary FROM emp WHERE id <= 3);
36653665
----
36663666
logical_plan
36673667
01)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
36693669
03)----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

36883682
query I
36893683
SELECT id
@@ -3702,25 +3696,21 @@ WHERE salary > ALL (SELECT salary FROM emp WHERE id <= 2);
37023696
----
37033697
logical_plan
37043698
01)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
37083702
05)--------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
37113705
08)--------------TableScan: emp projection=[id, salary]
37123706
09)--------------SubqueryAlias: __correlated_sq_1
37133707
10)----------------Projection: emp.salary
37143708
11)------------------Filter: emp.id <= Int32(2)
37153709
12)--------------------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

37253715
query I
37263716
SELECT id
@@ -3737,25 +3727,19 @@ WHERE salary = ANY (SELECT salary FROM emp WHERE id <= 2);
37373727
----
37383728
logical_plan
37393729
01)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
37413731
03)----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

37603744
statement ok
37613745
DROP TABLE emp;

0 commit comments

Comments
 (0)