Skip to content

Commit 2730bbd

Browse files
committed
Add DISTINCT ON + join SLT
1 parent 5f0a26b commit 2730bbd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

datafusion/sqllogictest/test_files/distinct_on.slt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,16 @@ D 0 false
110110
D 1 true
111111
E 0 false
112112
E 1 false
113+
114+
# Joins using CTEs
115+
query II
116+
WITH t1 AS (SELECT * FROM aggregate_test_100),
117+
t2 AS (SELECT * FROM aggregate_test_100)
118+
SELECT DISTINCT ON (t1.c1, t2.c2) t2.c3, t1.c4
119+
FROM t1 INNER JOIN t2 ON t1.c13 = t2.c13
120+
ORDER BY t1.c1, t2.c2, t2.c5
121+
LIMIT 3;
122+
----
123+
-25 15295
124+
45 15673
125+
-72 -11122

0 commit comments

Comments
 (0)