andygrove commented on code in PR #13717: URL: https://github.com/apache/datafusion/pull/13717#discussion_r1880160207
########## datafusion/functions/src/datetime/date_part.rs: ########## @@ -148,7 +148,9 @@ impl ScalarUDFImpl for DatePartFunc { } fn return_type(&self, _arg_types: &[DataType]) -> Result<DataType> { - internal_err!("return_type_from_exprs shoud be called instead") + // return type could be Float32 or Int32 depending on the input arguments + // return_type_from_exprs should be called instead + Ok(DataType::Float64) Review Comment: However, this is a breaking change and is currently blocking Comet from upgrading its DataFusion version. We do not have access to the logical `Expr` to call the newer `return_type_from_exprs` because we are only working with DataFusion's physical plans. I think I would prefer the non-breaking behavior of maintaining the functionality from DataFusion 43 and marking this as deprecated until we can find a better solution. Maybe @alamb has thoughts on how we can best handle this to avoid causing pain for downstream projects? -- 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