Skip to content

fix(compute): detect temporal rounding overflow - #1127

Draft
fallintoplace wants to merge 9 commits into
apache:mainfrom
fallintoplace:fix/temporal-rounding-overflow
Draft

fix(compute): detect temporal rounding overflow#1127
fallintoplace wants to merge 9 commits into
apache:mainfrom
fallintoplace:fix/temporal-rounding-overflow

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

Temporal rounding can overflow while converting timestamps to nanoseconds, calculating the rounding interval, or multiplying a rounded quotient. The current unchecked arithmetic can return an incorrect timestamp.

What changes are included in this PR?

Use checked arithmetic for temporal conversions, interval setup, rounding results, calendar conversion, and origin adjustments. Propagate overflow as an Arrow invalid-value error.

Are these changes tested?

  • go test ./arrow/compute

Are there any user-facing changes?

Inputs and options that cannot be represented during temporal rounding now return an error instead of a wrapped result.

@fallintoplace
fallintoplace force-pushed the fix/temporal-rounding-overflow branch from 2fb9343 to 65f4e12 Compare August 6, 2026 19:45
@fallintoplace
fallintoplace force-pushed the fix/temporal-rounding-overflow branch from 65f4e12 to 71e18ac Compare August 7, 2026 21:01
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