a10y opened a new issue, #18957: URL: https://github.com/apache/datafusion/issues/18957
### Describe the bug If we try and rewrite an expression that operates over a struct column, currently the DefaultPhysicalExprRewriter will fail b/c the arrow cast kernel uses an overly strict check for Struct castability, namely that the two structs have identical types. https://github.com/apache/datafusion/blob/769f36732a284cec3d549bfcda50cb67684fb5dc/datafusion/physical-expr-adapter/src/schema_rewriter.rs#L416-L417 However, the DefaultSchemaAdapter does the right thing here, checking for backward-compatible schema compatibility using the `can_cast_field` function https://github.com/apache/datafusion/blob/769f36732a284cec3d549bfcda50cb67684fb5dc/datafusion/datasource/src/schema_adapter.rs#L260-L264 ### To Reproduce _No response_ ### Expected behavior _No response_ ### Additional context It's possible this is addressed by https://github.com/apache/datafusion/pull/18627, haven't had a chance to look through it yet. -- 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]
