Repository navigation
Keep same-scale decimal widening casts lazy - #11006
Merged
Merged
Conversation
This was referenced Oct 29, 2026
Merging this PR will improve performance by 52.78%1 warning
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
20 of 34 tasks
connortsui20
force-pushed
the
ct/decimal-widen-lazy-cast
branch
from
October 30, 2026 17:50
c0ec9ab to
778cd7f
Compare
connortsui20
force-pushed
the
ct/decimal-widen-lazy-cast
branch
3 times, most recently
from
November 2, 2026 16:57
c63777d to
f0c5f99
Compare
12 of 23 tasks
connortsui20
force-pushed
the
ct/decimal-widen-lazy-cast
branch
from
November 2, 2026 17:08
f0c5f99 to
d7148e8
Compare
connortsui20
force-pushed
the
ct/decimal-widen-lazy-cast
branch
3 times, most recently
from
November 2, 2026 19:52
a1561b3 to
a47042b
Compare
connortsui20
force-pushed
the
ct/decimal-widen-lazy-cast
branch
2 times, most recently
from
November 2, 2026 21:29
c408380 to
2a0bb0e
Compare
connortsui20
force-pushed
the
ct/decimal-widen-lazy-cast
branch
from
November 3, 2026 13:20
2a0bb0e to
da3eab3
Compare
connortsui20
force-pushed
the
ct/decimal-widen-lazy-cast
branch
2 times, most recently
from
November 3, 2026 14:22
0ed30bc to
1bad4e5
Compare
connortsui20
force-pushed
the
ct/decimal-widen-lazy-cast
branch
2 times, most recently
from
November 3, 2026 15:12
2f1c268 to
42f6d55
Compare
connortsui20
force-pushed
the
ct/decimal-widen-lazy-cast
branch
from
November 3, 2026 16:31
42f6d55 to
89ce253
Compare
connortsui20
force-pushed
the
ct/decimal-widen-lazy-cast
branch
from
November 3, 2026 16:46
89ce253 to
ff3c6f3
Compare
connortsui20
force-pushed
the
ct/decimal-widen-lazy-cast
branch
from
November 3, 2026 21:25
ff3c6f3 to
76ae246
Compare
joseph-isaacs
force-pushed
the
ct/decimal-widen-lazy-cast
branch
from
November 4, 2026 13:53
76ae246 to
a34855c
Compare
connortsui20
marked this pull request as ready for review
November 4, 2026 16:33
connortsui20
force-pushed
the
ct/decimal-widen-lazy-cast
branch
2 times, most recently
from
November 4, 2026 17:00
cbdec26 to
916a6f7
Compare
Return a Widen when a same-scale decimal cast increases the canonical width, so callers can defer the copy until execution. Preserve the source dtype, value buffer, and statistics on the child, and pass subsequent decimal Widen casts through to that child. Cover width changes, noncanonical storage, nullability, statistics, repeated casts, and the default writer round trip. Consolidate the older precision-growth and buffer-reuse tests into the parameterized coverage. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Keep canonical and Widen inputs for lazy construction, and one end-to-end canonical cast for execution into i256 values. Avoid a second end-to-end case that overlaps the construction and execution coverage. Update the CodSpeed target count to match the nine cases. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
connortsui20
force-pushed
the
ct/decimal-widen-lazy-cast
branch
from
November 4, 2026 17:17
916a6f7 to
9b68f5a
Compare
connortsui20
enabled stacked auto-merge (squash)
November 4, 2026 17:22
robert3005
approved these changes
Nov 4, 2026
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
Top of the decimal
Widenstack, on #11005. No release gate.Summary
A same-scale precision increase copied every value into a wider buffer even when the caller did not need the values yet. Returning a
Widendefers that copy and lets subsequent kernels keep working on the narrow child.Basically, we might as well keep things in
Widenform instead of casting immediately.Changes
The child retains the source dtype and statistics because its values are unchanged. A cast of a decimal
Widenpasses to that child. Execution copies into the logical width directly, since yielding another widening cast would return aWidenagain. The default-writer test compares round-trip values.Known cost: the retained benchmarks show slower filtering at precision 38 (see #10946).
Historical local benchmark results
These retained measurements predate this style pass and rebase. They do not measure the current head.
cargo bench -p vortex-array --bench widen_decimal, Apple M4, medians. The numbers were measured at the top of this stack before the split, so they cover the whole stack, not this layer alone. The baseline is the canonical input, and the candidate is the same values as aWiden(child precision 5 under precision 10, 9 under 18, and 18 under 38). CodSpeed on this PR measures the layer itself.cast_widenAPI Changes
A same-scale decimal cast returns a
Widenwhen the target precision grows the canonical width.