sgrebnov opened a new pull request, #13129:
URL: https://github.com/apache/datafusion/pull/13129
## Which issue does this PR close?
PR adds basic support for `UNNEST` unparsing: Lists/Arrays only (structs
support needs some extra work and could be added as incremental improvement).
## What changes are included in this PR?
1. PR adds handler for `LogicalPlan::Unnest` and updates
`reconstruct_select_statement` to check if there is `Unnest` child so that
corresponding columns are correctly unprojected (see below) via
`unproject_unnest_expr`. For example
`column("unnest_placeholder([Int64(1),Int64(2),Int64(2),Int64(5),NULL],depth=1)")`
is transformed into `UNNEST([1, 2, 2, 5, NULL])`.
1. Adds `unnest_to_sql` to convert an UNNEST expression to an AST. Since
there is no dedicated representation for UNNEST in the AST, the implementation
converts the expression to a function call.
## Are these changes tested?
Added unit tests, tested as part of internal
https://github.com/spiceai/spiceai functionality.
## Are there any user-facing changes?
Can now unparse plans with unnest (lists/arrays only).
--
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]