waynexia opened a new issue, #14801: URL: https://github.com/apache/datafusion/issues/14801
### Is your feature request related to a problem or challenge? `UNNEST` is implemented in two ways, `SELECT UNNEST(...)` is handled with other functions https://github.com/apache/datafusion/blob/84232d806070f4b177e35148255c501a5f6e740b/datafusion/sql/src/expr/function.rs#L246-L255 And `SELECT ... FROM UNNEST(...)` is provided as `TableFactory` https://github.com/apache/datafusion/blob/84232d806070f4b177e35148255c501a5f6e740b/datafusion/sql/src/relation/mod.rs#L117-L123 But those two ways are both non-generic, cases like substrait can't handle it properly, as the decoder will try to look for table function: ```rs async fn roundtrip_unnest() -> Result<()> { roundtrip("SELECT * FROM unnest([1, 2, 3])").await } ``` ### Describe the solution you'd like Implement `UNNEST` as a table function, making it more general and reduce the complexity (and branches) of implementation ### Describe alternatives you've considered _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: github-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org