codephage2020 commented on PR #9345: URL: https://github.com/apache/arrow-rs/pull/9345#issuecomment-3875189404
Thanks for the reviews @alamb @sdf-jkl! I've pushed an update addressing all feedback. Here's a summary of changes: 1. **`from_datetime` now returns `Option<i64>`** — changed the signature from `-> i64` to `-> Option<i64>` as suggested. For millisecond and microsecond precision, the implementation now uses checked arithmetic (`checked_mul`/`checked_add`) consistent with `make_value`, instead of relying on chrono's `timestamp_millis()`/`timestamp_micros()` which can silently overflow. 2. **Added overflow test** — new `timestamp_from_datetime_overflow` test verifies that `from_datetime` correctly returns `None` for nanosecond precision with extreme datetime values. 3. **Documentation note** — added a note on `from_naive_datetime` that passing `tz=None` is equivalent to calling `Self::make_value`. 4. **Squashed commits** — cleaned up the git history into a single commit. Could you take another look when you get a chance? Thanks! -- 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]
