Skip to content

fix(parquet/pqarrow): reject out-of-range INT96 timestamps - #1128

Draft
fallintoplace wants to merge 3 commits into
apache:mainfrom
fallintoplace:fix/parquet-int96-range
Draft

fix(parquet/pqarrow): reject out-of-range INT96 timestamps#1128
fallintoplace wants to merge 3 commits into
apache:mainfrom
fallintoplace:fix/parquet-int96-range

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

transferInt96 converts Parquet INT96 values through time.Time.UnixNano without checking the int64 nanosecond range. Very wide dates can therefore wrap when read as Arrow timestamp[ns].

What changes are included in this PR?

Add checked INT96 to nanosecond conversion, propagate conversion errors through the Parquet reader, and normalize Int96.ToTime without overflowing before the range check.

Are these changes tested?

  • go test ./parquet/pqarrow -run 'Test(ArrowTimestampToImpalaTimestamp|ReadInt96RejectsOutOfRangeTimestamp|WriteArrowInt96)$'

Are there any user-facing changes?

In-range INT96 behavior is unchanged. Out-of-range INT96 timestamps now return an error instead of being wrapped.

@fallintoplace
fallintoplace marked this pull request as ready for review August 7, 2026 22:13
@fallintoplace
fallintoplace marked this pull request as draft August 7, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant