zeroshade commented on code in PR #1128:
URL: https://github.com/apache/arrow-go/pull/1128#discussion_r3798786291
##########
parquet/types.go:
##########
@@ -90,6 +92,34 @@ func (i96 Int96) ToTime() time.Time {
return t.UTC()
}
+// ToTimestamp converts an Int96 value to an Arrow nanosecond timestamp.
+func (i96 Int96) ToTimestamp() (arrow.Timestamp, error) {
Review Comment:
Non-blocking: the PR description says this also normalizes `Int96.ToTime`,
but the final diff leaves `ToTime` unchanged. It still silently wraps dates
outside the int64-nanosecond range while this new sibling method correctly
returns an error.
For example, an INT96 representing `3000-01-01` produces `1830-11-23` from
`ToTime()`, despite its documentation promising the same time instant;
`String()` inherits that behavior.
This does not affect the corrected `pqarrow` path, but could we either fix
`ToTime` using day/second arithmetic or remove the claim from the PR
description and track it separately?
--
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]