From 96537968d50ff4f990246a6d38ff18bc0f9fed84 Mon Sep 17 00:00:00 2001 From: jakevin Date: Sat, 28 Jan 2023 17:28:21 +0800 Subject: [PATCH] sqllogicaltest: fix unstable slt case. (#5095) * sqllogicaltest: fix unstable slt case. * sqllogicaltest: fix unstable slt case. --- .../tests/sqllogictests/test_files/union.slt | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/datafusion/core/tests/sqllogictests/test_files/union.slt b/datafusion/core/tests/sqllogictests/test_files/union.slt index 7f387e8c51e8..d163d191e0e1 100644 --- a/datafusion/core/tests/sqllogictests/test_files/union.slt +++ b/datafusion/core/tests/sqllogictests/test_files/union.slt @@ -80,6 +80,7 @@ query I SELECT 1 as x UNION ALL SELECT 2 as x +ORDER BY x ---- 1 2 @@ -119,6 +120,7 @@ query I SELECT 1 as x UNION SELECT 1 as x +ORDER BY x ---- 1 @@ -147,33 +149,32 @@ SELECT COUNT(*) FROM ( # union_schemas query I -SELECT 1 A UNION ALL SELECT 2 order by 1 +SELECT 1 A UNION ALL SELECT 2 ORDER BY 1 ---- 1 2 # union_schemas query I -SELECT 1 UNION SELECT 2 order by 1 +SELECT 1 UNION SELECT 2 ORDER BY 1 ---- 1 2 # union_with_except_input query T -SELECT * FROM ( - ( - SELECT name FROM t1 - EXCEPT - SELECT name FROM t2 - ) - UNION ALL - ( - SELECT name FROM t2 - EXCEPT - SELECT name FROM t1 - ) -) ORDER BY name +( + SELECT name FROM t1 + EXCEPT + SELECT name FROM t2 +) +UNION ALL +( + SELECT name FROM t2 + EXCEPT + SELECT name FROM t1 +) +ORDER BY name ---- Alice John @@ -191,6 +192,7 @@ UNION ALL EXCEPT SELECT id, name FROM t1 ) +ORDER BY name ---- 3 Alice 3 John