jeffreyssmith2nd commented on code in PR #11711:
URL: https://github.com/apache/datafusion/pull/11711#discussion_r1697161978
##########
datafusion/expr/src/type_coercion/binary.rs:
##########
@@ -1725,6 +1774,27 @@ mod tests {
DataType::LargeBinary
);
+ // Timestamps
+ let utc: Option<Arc<str>> = Some("UTC".into());
+ test_coercion_binary_rule!(
+ DataType::Timestamp(TimeUnit::Second, utc.clone()),
+ DataType::Timestamp(TimeUnit::Second, utc.clone()),
+ Operator::Eq,
+ DataType::Timestamp(TimeUnit::Second, utc.clone())
+ );
+ test_coercion_binary_rule!(
+ DataType::Timestamp(TimeUnit::Second, utc.clone()),
+ DataType::Timestamp(TimeUnit::Second,
Some("Europe/Brussels".into())),
+ Operator::Eq,
+ DataType::Timestamp(TimeUnit::Second, utc.clone())
+ );
Review Comment:
This would pass as the code is currently written. I was originally leaning
towards coercing to UTC if it existed, otherwise choosing the left. But I was
worried that may be a little confusing and settled on always coercing to the
left. I'm happy to change it if we'd prefer the other way though.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]