viirya commented on code in PR #2317:
URL: https://github.com/apache/arrow-rs/pull/2317#discussion_r938149201
##########
arrow/src/temporal_conversions.rs:
##########
@@ -127,7 +127,7 @@ pub fn timestamp_ns_to_datetime(v: i64) -> NaiveDateTime {
// extract seconds from nanoseconds
v / NANOSECONDS,
// discard extracted seconds
- (v % NANOSECONDS) as u32,
+ if v > 0 { (v % NANOSECONDS) as u32 } else { 0 },
Review Comment:
When `v` is negative, this parameter causes `invalid or out-of-range
datetime` error. Just temporarily avoid the failure here. Other function like
`timestamp_us_to_datetime` might have same issue.
--
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]