This is an automated email from the ASF dual-hosted git repository.
ytyou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 3a40625e2e test: Fix flaky join tests (#16860)
3a40625e2e is described below
commit 3a40625e2eb5b7817c084a02bfabc25017a5a690
Author: Yongting You <[email protected]>
AuthorDate: Thu Jul 24 15:47:10 2025 +0800
test: Fix flaky join tests (#16860)
* Fix flaky join tests
* fix flaky join slts
* Update datafusion/sqllogictest/test_files/joins.slt
Co-authored-by: Piotr Findeisen <[email protected]>
* Update datafusion/sqllogictest/test_files/joins.slt
Co-authored-by: Piotr Findeisen <[email protected]>
* Update datafusion/sqllogictest/test_files/joins.slt
Co-authored-by: Piotr Findeisen <[email protected]>
---------
Co-authored-by: Piotr Findeisen <[email protected]>
---
datafusion/sqllogictest/test_files/join.slt.part | 18 +++++------
datafusion/sqllogictest/test_files/joins.slt | 40 ++++++++++++++++++------
2 files changed, 39 insertions(+), 19 deletions(-)
diff --git a/datafusion/sqllogictest/test_files/join.slt.part
b/datafusion/sqllogictest/test_files/join.slt.part
index 19763ab008..203dc328e7 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 d426627274..5bac183cec 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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]