From c9586d75d140716668b64939f441c1216897d5ef Mon Sep 17 00:00:00 2001 From: Liang-Chi Hsieh Date: Thu, 1 Feb 2024 07:47:55 -0800 Subject: [PATCH] Update existing test --- datafusion/sqllogictest/test_files/join.slt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/datafusion/sqllogictest/test_files/join.slt b/datafusion/sqllogictest/test_files/join.slt index 05068e92c1c8..e5cbf31c833e 100644 --- a/datafusion/sqllogictest/test_files/join.slt +++ b/datafusion/sqllogictest/test_files/join.slt @@ -602,14 +602,15 @@ CREATE TABLE t1(a text, b int) AS VALUES ('Alice', 50), ('Alice', 100); statement ok CREATE TABLE t2(a text, b int) AS VALUES ('Alice', 2), ('Alice', 1); -# the current query results are incorrect, becuase the query was incorrectly rewritten as: -# SELECT t1.a, t1.b FROM t1 JOIN t2 ON t1.a = t2.a ORDER BY t1.a, t1.b; -# the difference is ORDER BY clause rewrite from t2.b to t1.b, it is incorrect. -# after https://github.com/apache/arrow-datafusion/issues/8374 fixed, the correct result should be: -# Alice 50 -# Alice 100 -# Alice 50 -# Alice 100 +# test 'ORDER BY' joined result with same column name +query TI +SELECT t1.a, t1.b FROM t1 JOIN t2 ON t1.a = t2.a ORDER BY t1.a, t1.b; +---- +Alice 50 +Alice 50 +Alice 100 +Alice 100 + query TI SELECT t1.a, t1.b FROM t1 JOIN t2 ON t1.a = t2.a ORDER BY t1.a, t2.b; ----