Skip to content

Commit 5cbeb1c

Browse files
committed
test: reproducer of bug
1 parent 4ea7601 commit 5cbeb1c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

datafusion/sqllogictest/test_files/aggregate.slt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,6 +1821,23 @@ c 122
18211821
d 124
18221822
e 115
18231823

1824+
1825+
# using approx_percentile_cont on 2 columns with same signature
1826+
query error DataFusion error: Schema error: Schema contains duplicate unqualified field name "approx_percentile_cont\(Float64\(0\.95\)\)"
1827+
SELECT c1, approx_percentile_cont(c2, 0.95) AS c2, approx_percentile_cont(c3, 0.95) AS c3 FROM aggregate_test_100 GROUP BY 1 ORDER BY 1
1828+
1829+
# error is unique to this UDAF
1830+
query TRR
1831+
SELECT c1, avg(c2) AS c2, avg(c3) AS c3 FROM aggregate_test_100 GROUP BY 1 ORDER BY 1
1832+
----
1833+
a 2.857142857143 -18.333333333333
1834+
b 3.263157894737 -5.842105263158
1835+
c 2.666666666667 -1.333333333333
1836+
d 2.444444444444 25.444444444444
1837+
e 3 40.333333333333
1838+
1839+
1840+
18241841
query TI
18251842
SELECT c1, approx_percentile_cont(0.95) WITHIN GROUP (ORDER BY c3 DESC) AS c3_p95 FROM aggregate_test_100 GROUP BY 1 ORDER BY 1
18261843
----

0 commit comments

Comments
 (0)