should be it

This commit is contained in:
2025-10-24 19:21:19 -05:00
parent a4b23fc57c
commit f09560c7b1
14047 changed files with 3161551 additions and 1 deletions

View File

@@ -0,0 +1,47 @@
# name: test/optimizer/unused_columns/distinct_on_projection_pushdown.test
# description: Test DISTINCT ON ORDER BY
# group: [unused_columns]
statement ok
create table t0 as select range%1000 col0, random()*1000 col1, random()*100 col2, '1' col3, '2' col4, '3' col5 from range(10000);
query I nosort res_1
SELECT col0
FROM
(
SELECT
DISTINCT ON (floor(col0))
*
FROM t0
ORDER by col0 DESC
);
----
1000 values hashing to 796a92aea33b9601284e2a4ac9e6587e
query I nosort res_1
SELECT col0
FROM
(
SELECT
DISTINCT ON (floor(col0))
col0
FROM t0
ORDER by col0 DESC
);
----
statement ok
PRAGMA explain_output = OPTIMIZED_ONLY;
query II
EXPLAIN SELECT col0
FROM
(
SELECT
DISTINCT ON (floor(col0))
*
FROM t0
ORDER by col0 DESC
)
----
logical_opt <!REGEX>:.*col[1-5].*