Repository navigation
Keep same-scale decimal widening casts lazy - #11006
Draft
connortsui20 wants to merge 1 commit into
Draft
connortsui20 wants to merge 1 commit into
connortsui20 wants to merge 1 commit into
Conversation
This was referenced Oct 29, 2026
Merging this PR will regress 5 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-lazy-cast
branch
from
October 30, 2026 17:50
c0ec9ab to
778cd7f
Compare
A same-scale cast that grows the canonical width copied every value into the wider type, even when the caller never reads them all. Return a decimal Widen over the source instead, whose dtype is a true label for its values, so the copy waits for execution. The child also keeps the statistics of the source, such as exact extrema, because it holds the same values. A cast of a decimal Widen passes to its child. This is the first production code that builds a decimal Widen. Widen execution already copies decimal values instead of yielding a cast, which now also keeps it from yielding a cast that returns a Widen again. A test checks that the default file writer round-trips a decimal Widen. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
connortsui20
force-pushed
the
ct/decimal-widen-lazy-cast
branch
from
October 30, 2026 19:28
778cd7f to
7819bca
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
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.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.