Skip to content

fix(parquet/pqarrow): reject decimal overflow in integer columns - #1122

Draft
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/parquet-decimal-overflow
Draft

fix(parquet/pqarrow): reject decimal overflow in integer columns#1122
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/parquet-decimal-overflow

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

The Parquet decimal integer conversion uses debug assertions for range checks. Those assertions are disabled in normal builds, so values outside the signed INT32 or INT64 range can be silently narrowed.

What changes are included in this PR?

Check signed range boundaries for Decimal128 and Decimal256 values before converting them to Parquet INT32 or INT64 columns, and return an error when a value does not fit.

Are these changes tested?

  • go test ./parquet/pqarrow -run TestDecimalIntegerOverflow

Are there any user-facing changes?

Values that do not fit the target Parquet integer type now return an error instead of being truncated.

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