asubiotto opened a new pull request, #20907:
URL: https://github.com/apache/datafusion/pull/20907
Previously, DefaultPhysicalExprAdapterRewriter.create_cast_column_expr would
only allow struct evolution for top-level structs. However, it is valid to have
structs that are nested inside other complex types (e.g. Dictionary<_, Struct>,
List<Struct>). These cases would previously return an error although they were
valid.
This commit handles Structs that are arbitrarily nested within certain
complex types (Lists, ListViews, and Dicts). Other complex types can be
supported in the future, but I think this is good enough for now.
## Which issue does this PR close?
- Closes #20906
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in
the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your
changes and offer better suggestions for fixes.
-->
Struct evolution is supported, this PR fixes an edge case where struct
evolution is not supported when structs are nested inside other complex types.
## What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is
sometimes worth providing a summary of the individual changes in this PR.
-->
## Are these changes tested?
Yes, I initially wrote parametrized tests, but I think that's probably
overkill.
## Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->
Queries that would previously error, now complete successfully.
--
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]