Open soerenwolfers opened 1 month ago
From my understanding of https://duckdb.org/docs/sql/expressions/star.html#struct, I should be able to apply struct.* anywhere, including on the result of an aggregate.
struct.*
FROM ( SELECT unnest(range(10)) % 3, random(), random() ) df(id, value1, value2) SELECT first(df).* GROUP BY id
throws
Parser Error: syntax error at or near "*"
but should do the same as
FROM ( SELECT unnest(range(10)) % 3, random(), random() ) df(id, value1, value2) SELECT unnest(first(df)) GROUP BY id
┌───────┬──────────────────────┬─────────────────────┐ │ id │ value1 │ value2 │ │ int64 │ double │ double │ ├───────┼──────────────────────┼─────────────────────┤ │ 0 │ 0.9082586837466806 │ 0.83812924195081 │ │ 2 │ 0.007013199618086219 │ 0.957239514682442 │ │ 1 │ 0.03558909869752824 │ 0.07476666080765426 │ └───────┴──────────────────────┴─────────────────────┘
Linux
1.0.0
Python
Soeren Wolfers
G-Research
I have tested with a stable release
Not applicable - the reproduction does not require a data set
Thanks for reporting, indeed its odd that that does not work
What happens?
From my understanding of https://duckdb.org/docs/sql/expressions/star.html#struct, I should be able to apply
struct.*
anywhere, including on the result of an aggregate.To Reproduce
throws
but should do the same as
OS:
Linux
DuckDB Version:
1.0.0
DuckDB Client:
Python
Full Name:
Soeren Wolfers
Affiliation:
G-Research
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?