TheR1sing3un opened a new pull request, #10363: URL: https://github.com/apache/paimon/pull/10363
### Purpose DECIMAL global-index keys currently depend on Python's ambient decimal context. A valid DECIMAL(38,2) value such as `123456789012345678901234567890123456.78` fails to serialize at the default precision of 28, and decoding its existing unscaled bytes silently rounds away digits. This can break BTree/bitmap equality and range lookups. Use a dedicated context with sufficient precision for scale rounding and reconstruct decoded decimals exactly from their coefficient and scale. Preserve HALF_UP rounding and the existing compact/non-compact byte formats without changing the caller's context. ### Tests - New regression coverage for compact and 38-digit decimals, negative values, scale 38, zero, exact decoding, rounding with caller traps enabled, and persisted BTree/bitmap equality and range queries. - All 11 new tests pass; 10 fail against the unchanged base. - Existing `global_index_build_test.py` and `global_index_scalar_search_mode_test.py` pass (44 tests). - Flake8 for changed files and `git diff --check` pass. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
