Skip to content

Commit

Permalink
Add simple exclude all columns test to sqllogictest (#7945)
Browse files Browse the repository at this point in the history
* Add simple exclude all columns test to sqllogictest

* Add more exclude test cases
  • Loading branch information
Jefffrey authored Oct 28, 2023
1 parent 74fc6f8 commit 46ae9a4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions datafusion/sqllogictest/test_files/select.slt
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,26 @@ statement error DataFusion error: Error during planning: EXCLUDE or EXCEPT conta
SELECT * EXCLUDE(a, a)
FROM table1

# if EXCEPT all the columns, query should still succeed but return empty
statement ok
SELECT * EXCEPT(a, b, c, d)
FROM table1

# EXCLUDE order shouldn't matter
query II
SELECT * EXCLUDE(b, a)
FROM table1
ORDER BY c
LIMIT 5
----
100 1000
200 2000

# EXCLUDE with out of order but duplicate columns should error
statement error DataFusion error: Error during planning: EXCLUDE or EXCEPT contains duplicate column names
SELECT * EXCLUDE(d, b, c, a, a, b, c, d)
FROM table1

# run below query in multi partitions
statement ok
set datafusion.execution.target_partitions = 2;
Expand Down

0 comments on commit 46ae9a4

Please sign in to comment.