andygrove commented on code in PR #7919:
URL: https://github.com/apache/arrow-datafusion/pull/7919#discussion_r1370239945


##########
datafusion/expr/src/built_in_function.rs:
##########
@@ -315,6 +320,72 @@ fn function_to_name() -> &'static 
HashMap<BuiltinScalarFunction, &'static str> {
     })
 }
 
+/// Returns the wider type among lhs and rhs.
+/// Wider type is the type that can safely represent the other type without 
information loss.
+/// Returns Error if types are incompatible.
+fn get_wider_type(lhs: &DataType, rhs: &DataType) -> Result<DataType> {

Review Comment:
   Would it make sense to move this function into the `expr::type_coercion` 
module, where we have similar functions, such as `get_wider_decimal_type`?



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

Reply via email to