liukun4515 commented on code in PR #4741: URL: https://github.com/apache/arrow-datafusion/pull/4741#discussion_r1058271339
########## datafusion/expr/src/type_coercion/functions.rs: ########## @@ -177,35 +177,12 @@ pub fn can_coerce_from(type_into: &DataType, type_from: &DataType) -> bool { Timestamp(TimeUnit::Nanosecond, None) => { matches!(type_from, Null | Timestamp(_, None)) } - Date32 => { - matches!(type_from, Null | Timestamp(_, None)) - } Utf8 | LargeUtf8 => true, Null => can_cast_types(type_from, type_into), _ => false, } } -/// Returns a common coerced datatype between 2 given datatypes -/// -/// See the module level documentation for more detail on coercion. -pub fn get_common_coerced_type( Review Comment: > I think this method can be of some interest, if the user wants to check the common coerced type between 2 datatypes? the common coerced type will be decided by `input exprs/input types` and `op`, if the `op` is different and the same `input types/input exprs` may get the different coerced 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org