Skip to content

fix(util): guard decimal scale operations - #1100

Open
gty404 wants to merge 1 commit into
apache:mainfrom
gty404:fix/decimal-scale-java-compatible
Open

gty404 wants to merge 1 commit into
apache:mainfrom
gty404:fix/decimal-scale-java-compatible

Conversation

@gty404

@gty404 gty404 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Guard decimal rescale and comparison scale deltas before indexing the fixed powers-of-ten table.
  • Compute scale differences in int64_t to avoid signed overflow and preserve arbitrary DecimalType scales.
  • Add regression coverage for oversized deltas, extreme int32_t scales, zero rescaling, and arbitrary type scales.

Validation: ninja -C build util_test schema_test; focused decimal/type tests; full util_test (421 tests) and schema_test (578 tests).

Protect decimal power-table accesses from unvalidated scale deltas while preserving arbitrary DecimalType scales.
@zhjwpku

zhjwpku commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Is this the same as #1084 ?

This branch has not been deployed

No deployments
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.

2 participants