LiaCastaneda opened a new pull request, #25418: URL: https://github.com/apache/datafusion/pull/25418
`create_physical_expr` required an `Expr::LambdaVariable`'s field to equal the planning schema's field and returned a plan error otherwise. The two can legitimately differ when a plan producer records a type that Substrait cannot express, such as dictionary encoding or a string view, since the recorded field and the field derived by `lambda_parameters` come from independent sources. Cast the variable to the recorded type instead, the same way scalar function arguments are cast to their coerced types. Incompatible types still fail, as a cast error. Tests cover dictionary-encoded and string-view list elements, the presence and absence of the inserted cast, and a Substrait plan whose read schema is dictionary encoded while its lambda parameter is plain. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
