Phillip Cloud
Phillip Cloud
Opened a feature request in DuckDB for adding support for grouping by unnests: https://github.com/duckdb/duckdb/discussions/17884
I wonder if there's some DuckDB specific thing we can do here that would take any query with `SELECT UNNEST(x) FROM t` and rewrite it as `SELECT * REPLACE (UNNEST(x)...
The hairy part is of course that `UNNEST` can be buried in an arbitrarily deep expression such as `1 * 2 * LOG(UNNEST(x))`
This is somewhat tricky because of the way risingwave encodes struct types.
I think I managed to get a first version of this working (meaning passing all existing tests without changing the tests).
There are some complications here :) 1. RisingWave's `DESCRIBE` returns a shredded schema, which would be fine if it actually segmented field names for fields in structs like this: `STRUCT`....
Moving to draft until there's a risingwave release with their changes.
Going to do this in a separate, new PR.
Thanks for the report! Is there a particular backend you're interested in?
@mesejo Any interest in creating a PR for this?