Repository navigation
Read stored decimal values into the canonical array or a Widen - #11005
Draft
connortsui20 wants to merge 2 commits into
Draft
connortsui20 wants to merge 2 commits into
connortsui20 wants to merge 2 commits into
Conversation
This was referenced Oct 29, 2026
Merging this PR will regress 2 benchmarks1 warning
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing |
11 of 32 tasks
connortsui20
force-pushed
the
ct/decimal-widen-stored
branch
from
October 30, 2026 17:50
eb6bfc5 to
b3b006c
Compare
Readers meet decimal values at a stored width that can differ from the canonical width of their dtype: old `vortex.decimal` nodes and decoded DecimalByteParts. Add `WidenArray::from_stored_decimal` so that both share one conversion. A canonical stored width passes through without a scan, also for device buffers. Any other width copies to the host and becomes a decimal Widen over the narrowest child, or the canonical array when no child is narrower. The parts are checked first, because `execute_mask` and `valid_range` assert on a length mismatch and a read must never panic. `encode_decimal` now shares the core that picks the child, so it reuses the input buffer when its stored width already is the child width, and the child records the extrema of the scan. A caller can pass the range as a `Precision`: `Absent` scans, an `Exact` range becomes the exact extrema of the child, and an `Inexact` range is a bound that the child records as inexact. Signed-off-by: Connor Tsui <[email protected]>
Signed-off-by: Connor Tsui <[email protected]>
connortsui20
force-pushed
the
ct/decimal-widen-stored
branch
from
October 30, 2026 19:28
b3b006c to
e50341e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracking Issue: #10701
Stacked on #11004. #11006, #10905 and #10995 build on it. No release gate.
Summary
Old decimal nodes and decoded DecimalByteParts can store values at another width than their dtype's canonical width. They need one conversion rule, since a child precision that misses a value would make later comparison shortcuts incorrect.
Changes
Canonical storage reuses its buffer without a scan, including device buffers. Other storage reads on the host and becomes a
Widenover the smallest valid child, or the canonical array when no child is narrower. Encoding shares the same child selection. Known ranges can avoid a scan, and exact extrema are cached on the child so later aggregates reuse that work.API Changes
Adds
WidenArray::from_stored_decimal(parts, known_range, ctx). A supplied range must contain every valid value. Exact ranges become exact child extrema, while inexact ranges remain bounds.