jackwener commented on code in PR #6206:
URL: https://github.com/apache/arrow-datafusion/pull/6206#discussion_r1184606516
##########
datafusion/expr/src/type_coercion/binary.rs:
##########
@@ -106,39 +106,62 @@ pub fn binary_operator_data_type(
}
}
-/// Coercion rules for all binary operators. Returns the output type
-/// of applying `op` to an argument of `lhs_type` and `rhs_type`.
-///
-/// Returns None if no suitable type can be found.
-///
-/// TODO this function is trying to serve two purposes at once; it
-/// determines the result type of the binary operation and also
-/// determines how the inputs can be coerced but this results in
-/// inconsistencies in some cases (particular around date + interval)
-/// when the input argument types do not match the output argument
-/// types
+/// The result of applying coercion to a binary operator.
+pub struct Coercion {
Review Comment:
This is a very nice PR!👍.
I have discuss about it with @liukun4515 .
--
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]