andygrove commented on PR #14283:
URL: https://github.com/apache/datafusion/pull/14283#issuecomment-2613808026

   > ```rust
   > 
   > let then_expr = try_cast(Arc::clone(e), &batch.schema(), 
return_type.clone())?;
   > 
   > ```
   > 
   > 
   > 
   > I think type handling should be handled correctly in logical layer before 
physical expression creation, so this doesn't make sense to me. Even checking 
type in `try_new` is also not ideal (although I think we didn't block the check 
for safety). We have done such type handling and coercion in logical layer 
already, we should try our best to avoid doing it twice in physical layer.
   
   @jayzhan211 in the Comet use case we do not have a DataFusion logical plan 
but are instead translating Spark physical plans to DataFusion physical plans.


-- 
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

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

Reply via email to