diff --git a/datafusion/sqllogictest/test_files/join.slt.part b/datafusion/sqllogictest/test_files/join.slt.part index 19763ab0083f..203dc328e71e 100644 --- a/datafusion/sqllogictest/test_files/join.slt.part +++ b/datafusion/sqllogictest/test_files/join.slt.part @@ -853,47 +853,47 @@ physical_plan 03)----DataSourceExec: partitions=1, partition_sizes=[1] 04)----DataSourceExec: partitions=1, partition_sizes=[1] -query ITT +query ITT rowsort SELECT e.emp_id, e.name, d.dept_name FROM employees AS e LEFT JOIN department AS d ON (e.name = 'Alice' OR e.name = 'Bob'); ---- -1 Alice HR 1 Alice Engineering +1 Alice HR 1 Alice Sales -2 Bob HR 2 Bob Engineering +2 Bob HR 2 Bob Sales 3 Carol NULL # neither RIGHT OUTER JOIN -query ITT +query ITT rowsort SELECT e.emp_id, e.name, d.dept_name FROM department AS d RIGHT JOIN employees AS e ON (e.name = 'Alice' OR e.name = 'Bob'); ---- -1 Alice HR 1 Alice Engineering +1 Alice HR 1 Alice Sales -2 Bob HR 2 Bob Engineering +2 Bob HR 2 Bob Sales 3 Carol NULL # neither FULL OUTER JOIN -query ITT +query ITT rowsort SELECT e.emp_id, e.name, d.dept_name FROM department AS d FULL JOIN employees AS e ON (e.name = 'Alice' OR e.name = 'Bob'); ---- -1 Alice HR 1 Alice Engineering +1 Alice HR 1 Alice Sales -2 Bob HR 2 Bob Engineering +2 Bob HR 2 Bob Sales 3 Carol NULL diff --git a/datafusion/sqllogictest/test_files/joins.slt b/datafusion/sqllogictest/test_files/joins.slt index d426627274f6..5bac183cecce 100644 --- a/datafusion/sqllogictest/test_files/joins.slt +++ b/datafusion/sqllogictest/test_files/joins.slt @@ -4164,23 +4164,43 @@ AS VALUES (3, 3, true), (3, 3, false); -query IIIIB -SELECT * FROM t0 FULL JOIN t1 ON t0.c1 = t1.c1 LIMIT 2; +query IIIIB rowsort +-- Note: using LIMIT value higher than cardinality before LIMIT to avoid query non-determinism +SELECT * FROM t0 FULL JOIN t1 ON t0.c1 = t1.c1 LIMIT 20; ---- -2 2 2 2 true +1 1 NULL NULL NULL 2 2 2 2 false - -query IIIIB -SELECT * FROM t0 FULL JOIN t1 ON t0.c2 >= t1.c2 LIMIT 2; ----- 2 2 2 2 true -3 3 2 2 true +3 3 3 3 false +3 3 3 3 true +4 4 NULL NULL NULL -query IIIIB -SELECT * FROM t0 FULL JOIN t1 ON t0.c1 = t1.c1 AND t0.c2 >= t1.c2 LIMIT 2; +query IIIIB rowsort +-- Note: using LIMIT value higher than cardinality before LIMIT to avoid query non-determinism +SELECT * FROM t0 FULL JOIN t1 ON t0.c2 >= t1.c2 LIMIT 20; ---- +1 1 NULL NULL NULL +2 2 2 2 false 2 2 2 2 true +3 3 2 2 false +3 3 2 2 true +3 3 3 3 false +3 3 3 3 true +4 4 2 2 false +4 4 2 2 true +4 4 3 3 false +4 4 3 3 true + +query IIIIB rowsort +-- Note: using LIMIT value higher than cardinality before LIMIT to avoid query non-determinism +SELECT * FROM t0 FULL JOIN t1 ON t0.c1 = t1.c1 AND t0.c2 >= t1.c2 LIMIT 20; +---- +1 1 NULL NULL NULL 2 2 2 2 false +2 2 2 2 true +3 3 3 3 false +3 3 3 3 true +4 4 NULL NULL NULL ## Test !join.on.is_empty() && join.filter.is_none() query TT