Skip to content

arrow-util: check for overflow in interval micros-to-nanos conversion#36226

Open
def- wants to merge 1 commit intoMaterializeInc:mainfrom
def-:fix-interval-overflow
Open

arrow-util: check for overflow in interval micros-to-nanos conversion#36226
def- wants to merge 1 commit intoMaterializeInc:mainfrom
def-:fix-interval-overflow

Conversation

@def-
Copy link
Copy Markdown
Contributor

@def- def- commented Apr 23, 2026

The IntervalMonthDayNano builder path introduced in #35753 computed iv.micros * 1_000 without an overflow check. Intervals with |micros| > i64::MAX / 1000 wrap in release and panic in debug. Switch to checked_mul and bail with an error instead.

The `IntervalMonthDayNano` builder path introduced in MaterializeInc#35753 computed
`iv.micros * 1_000` without an overflow check. Intervals with
`|micros| > i64::MAX / 1000` wrap in release and panic in debug. Switch
to `checked_mul` and bail with an error instead.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@def- def- requested a review from DAlperin April 23, 2026 06:43
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