You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/12/28 11:06:09 UTC
[GitHub] [arrow-datafusion] liukun4515 commented on a diff in pull request #4741: revert some code for #4726 / remove unnecessary coercion in physical plans
liukun4515 commented on code in PR #4741:
URL: https://github.com/apache/arrow-datafusion/pull/4741#discussion_r1058266719
##########
datafusion/expr/src/type_coercion/binary.rs:
##########
@@ -575,6 +575,7 @@ fn temporal_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Option<DataTyp
},
(Timestamp(_, tz), Utf8) => Some(Timestamp(TimeUnit::Nanosecond, tz.clone())),
(Utf8, Timestamp(_, tz)) => Some(Timestamp(TimeUnit::Nanosecond, tz.clone())),
+ // TODO: need to investigate the result type for the comparison between timestamp and date
Review Comment:
Yes
the result of comparison is bool type, but if left and right are the same data type, we should get the common type for left and right through the `type coercion`.
For example, INT32>INT64, the common type is INT64, and we should cast the left to INT64.
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org