alamb commented on code in PR #11535:
URL: https://github.com/apache/arrow-rs/pull/11535#discussion_r4271255667


##########
arrow-array/src/timezone.rs:
##########
@@ -355,4 +503,30 @@ mod tests {
         let err = "+9:00".parse::<Tz>().unwrap_err().to_string();
         assert!(err.contains("Invalid timezone"), "{}", err);
     }
+
+    #[test]
+    fn test_gap_info_fixed_offset() {

Review Comment:
   why is this test not located next to the other unit tests?



##########
arrow-array/src/timezone.rs:
##########
@@ -313,6 +421,46 @@ mod private {
             TzOffset(self.0.offset_from_utc_datetime(utc).fix())
         }
     }
+
+    #[inline]
+    pub(super) fn new_gap_info(_local: &NaiveDateTime, _tz: &Tz) -> 
Option<GapInfo> {
+        // Fixed offsets never contain gaps
+        None
+    }
+}
+
+/// Represents the information of a gap.
+///
+/// This returns useful information that can be used when converting a local 
[`NaiveDateTime`]
+/// to a timezone-aware [`DateTime`] with 
[`chrono::TimeZone::from_local_datetime`] and a gap
+/// ([`chrono::LocalResult::None`]) is found.

Review Comment:
   I wonder if we could provide some examples in the documentation? Or maybe as 
part of `new`?
   
   I think the concept of a `gap` is somewhat abstract (at least to me) without 
a concrete example (or having been down in the guts of date_bin for a while)



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