andygrove commented on code in PR #3865:
URL: https://github.com/apache/datafusion-comet/pull/3865#discussion_r3021399441


##########
native/spark-expr/src/utils.rs:
##########
@@ -174,6 +174,19 @@ fn datetime_cast_err(value: i64) -> ArrowError {
     ))
 }
 
+fn resolve_local_datetime(tz: &Tz, local_datetime: NaiveDateTime) -> 
DateTime<Tz> {
+    match tz.from_local_datetime(&local_datetime) {
+        LocalResult::Single(dt) => dt,
+        LocalResult::Ambiguous(dt, _) => dt,
+        LocalResult::None => {
+            // Interpret nonexistent local time by shifting from one hour 
earlier.
+            let shift = TimeDelta::hours(1);

Review Comment:
   The 1-hour shift works for standard DST transitions, but some timezones have 
non-standard gaps (e.g., Australia/Lord_Howe has a 30-minute DST transition). 
Yes, this is an edge case so it may be fine to ignore, but we should at least 
document this as an incompatibility.
   
   https://www.timeanddate.com/time/change/australia/lord-howe-island



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

Reply via email to