duckdb / duckdb

DuckDB is an in-process SQL OLAP Database Management System
http://www.duckdb.org
MIT License
17.74k stars 1.51k forks source link

describe in CTE #12060

Closed karlseguin closed 2 weeks ago

karlseguin commented 2 weeks ago

What happens?

It should be allowed to use "describe" in a CTE.

"describe" can already be used a subsequery and the duckdb_prepared_statement_type API return DUCKDB_STATEMENT_TYPE_SELECT for a "describe" or "describe table" statement.

To Reproduce

with x as (describe) select * from x;

Not implemented Error: A CTE needs a SELECT

OS:

n/a

DuckDB Version:

0.10.2

DuckDB Client:

C

Full Name:

Karl Seguin

Affiliation:

n/a

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

Did you include all relevant data sets for reproducing the issue?

Not applicable - the reproduction does not require a data set

Did you include all code required to reproduce the issue?

Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?