You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2023/10/28 09:40:19 UTC
(arrow-datafusion) branch main updated: Add simple exclude all columns test to sqllogictest (#7945)
This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 46ae9a4756 Add simple exclude all columns test to sqllogictest (#7945)
46ae9a4756 is described below
commit 46ae9a4756aaa56440748c0c529fa312aca23e96
Author: Jeffrey <22...@users.noreply.github.com>
AuthorDate: Sat Oct 28 20:40:13 2023 +1100
Add simple exclude all columns test to sqllogictest (#7945)
* Add simple exclude all columns test to sqllogictest
* Add more exclude test cases
---
datafusion/sqllogictest/test_files/select.slt | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/datafusion/sqllogictest/test_files/select.slt b/datafusion/sqllogictest/test_files/select.slt
index 1d42747976..98ea061c73 100644
--- a/datafusion/sqllogictest/test_files/select.slt
+++ b/datafusion/sqllogictest/test_files/select.slt
@@ -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;