jackwener commented on code in PR #6177:
URL: https://github.com/apache/arrow-datafusion/pull/6177#discussion_r1181482071
##########
datafusion/expr/src/type_coercion/binary.rs:
##########
@@ -147,14 +150,12 @@ pub fn coerce_types(
| Operator::IsNotDistinctFrom => comparison_coercion(lhs_type,
rhs_type),
// interval - timestamp is an erroneous case, cannot coerce a type
Operator::Plus | Operator::Minus
- if (is_date(lhs_type)
- || is_date(rhs_type)
- || is_timestamp(lhs_type)
- || is_timestamp(rhs_type)
+ if (is_datetime(lhs_type)
+ || is_datetime(rhs_type)
|| is_interval(lhs_type)
|| is_interval(rhs_type))
&& (!is_interval(lhs_type)
- || !is_timestamp(rhs_type)
Review Comment:
Here don't consider `DateType`
--
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]