alamb commented on code in PR #4148:
URL: https://github.com/apache/arrow-datafusion/pull/4148#discussion_r1016995895


##########
datafusion/optimizer/src/unwrap_cast_in_comparison.rs:
##########
@@ -766,6 +818,105 @@ mod tests {
         );
     }
 
+    #[test]
+    fn test_try_cast_to_type_timestamps() {
+        for time_unit in [
+            TimeUnit::Second,
+            TimeUnit::Millisecond,
+            TimeUnit::Microsecond,
+            TimeUnit::Nanosecond,
+        ] {
+            let utc = Some("+0:00".to_string());
+            // No timezone, utc timezone
+            let (lit_tz_none, lit_tz_utc) = match time_unit {

Review Comment:
   A note on the timezone handling is that `expect_cast` added in 
https://github.com/apache/arrow-datafusion/pull/4147 and used in this PR 
explicitly verifies that  calling the arrow `cast` kernel produces the same 
result as the code in this PR. 



-- 
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]

Reply via email to