Skip to content

Fix Variant reads of wide physical decimals - #11072

Draft
peterxcli wants to merge 1 commit into
apache:mainfrom
peterxcli:codex/variant-wide-decimal
Draft

Fix Variant reads of wide physical decimals#11072
peterxcli wants to merge 1 commit into
apache:mainfrom
peterxcli:codex/variant-wide-decimal

Conversation

@peterxcli

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #11067.

What changes are included in this PR?

Normalize Decimal256 inputs with Variant-compatible precision and scale to the appropriate decimal width. Use strict casts and check physical decimal narrowing so overflow returns an error and null payloads are skipped safely.

Are these changes tested?

Regression coverage includes Parquet files with 17- and 32-byte decimal columns, signed values, precision limits, overflow, nulls, and slices. Arrow cast and Variant tests, the Parquet regression, formatting, and Clippy pass with Rust 1.98.1.

Are there any user-facing changes?

Variant readers accept wide physical decimals with precision at most 38. Higher precision remains unsupported.

Implementation and tests developed with Codex assistance.

@github-actions github-actions Bot added parquet Changes to the parquet crate arrow Changes to the arrow crate parquet-variant parquet-variant* crates arrow-cast labels Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate arrow-cast parquet Changes to the parquet crate parquet-variant parquet-variant* crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Variant] Wide physical DECIMAL with precision <= 38 is inferred as Decimal256 and rejected

1 participant