alamb opened a new issue, #19689: URL: https://github.com/apache/datafusion/issues/19689
### Describe the bug I got an internal error when running a that unnests a struct and tries to add an alais ```sql > select unnest(unnest(column1)) as "a" from t; Internal error: Assertion failed: struct_allowed: unnest on struct can only be applied at the root level of select expression. This issue was likely caused by a bug in DataFusion's code. Please help us to resolve this by filing a bug report in our issue tracker: https://github.com/apache/datafusion/issues ``` ### To Reproduce ```sql > create or replace table t as values ({foo: 1, bar:2}); 0 row(s) fetched. Elapsed 0.007 seconds. ``` Unnesting works great ```sql > select unnest(column1) from t; +-------------------------------------+-------------------------------------+ | __unnest_placeholder(t.column1).foo | __unnest_placeholder(t.column1).bar | +-------------------------------------+-------------------------------------+ | 1 | 2 | +-------------------------------------+-------------------------------------+ 1 row(s) fetched. Elapsed 0.008 seconds. ``` Unnesting with an alias results in an internal error ```sql > select unnest(column1) as "a" from t; Internal error: Assertion failed: struct_allowed: unnest on struct can only be applied at the root level of select expression. This issue was likely caused by a bug in DataFusion's code. Please help us to resolve this by filing a bug report in our issue tracker: https://github.com/apache/datafusion/issues ``` ### Expected behavior _No response_ ### Additional context _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
