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/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 6d5ecb62b9 Add slt test for `DISTINCT ON` with wildcard (#12968)
6d5ecb62b9 is described below
commit 6d5ecb62b993f99301be444781d600f8042f2ca6
Author: Andrew Lamb <[email protected]>
AuthorDate: Wed Oct 16 13:28:30 2024 -0400
Add slt test for `DISTINCT ON` with wildcard (#12968)
---
datafusion/sqllogictest/test_files/distinct_on.slt | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/datafusion/sqllogictest/test_files/distinct_on.slt
b/datafusion/sqllogictest/test_files/distinct_on.slt
index 99639d78c3..604ac95ff4 100644
--- a/datafusion/sqllogictest/test_files/distinct_on.slt
+++ b/datafusion/sqllogictest/test_files/distinct_on.slt
@@ -144,6 +144,19 @@ LIMIT 3;
45 15673
-72 -11122
+# use wildcard
+query TIIIIIIIITRRT
+SELECT DISTINCT ON (c1) * FROM aggregate_test_100 ORDER BY c1 LIMIT 3;
+----
+a 1 -85 -15154 1171968280 1919439543497968449 77 52286 774637006
12101411955859039553 0.12285209 0.686439196277 0keZ5G8BffGwgF2RwQD59TFzMStxCB
+b 1 29 -18218 994303988 5983957848665088916 204 9489 3275293996
14857091259186476033 0.53840446 0.179090351188 AyYVExXK6AR2qUTxNZ7qRHQOVGMLcz
+c 2 1 18109 2033001162 -6513304855495910254 25 43062 1491205016
5863949479783605708 0.110830784 0.929409733247 6WfVFBVGJSQb7FhA7E0lBwdvjfZnSW
+
+# can't distinct on *
+query error DataFusion error: SQL error: ParserError\("Expected: an
expression:, found: \*"\)
+SELECT DISTINCT ON (*) c1 FROM aggregate_test_100 ORDER BY c1 LIMIT 3;
+
+
# test distinct on
statement ok
create table t(a int, b int, c int) as values (1, 2, 3);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]