Skip to content

Commit

Permalink
Update existing test
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Feb 1, 2024
1 parent c9049ed commit c9586d7
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions datafusion/sqllogictest/test_files/join.slt
Original file line number Diff line number Diff line change
Expand Up @@ -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;
----
Expand Down

0 comments on commit c9586d7

Please sign in to comment.