Repository navigation
Add a scan for the range of valid decimal values - #10939
Conversation
Share one allocation-free range scan between decimal Widen encoding, legacy decimal reads and DecimalByteParts lower-part selection. Ignore null slots and avoid scalar construction or precision checks. Test all six decimal widths, empty and all-null inputs, null-slot extrema and values outside decimal precision. Signed-off-by: Connor Tsui <[email protected]>
Merging this PR will regress 1 benchmark4 warnings
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Signed-off-by: Connor Tsui <[email protected]>
Signed-off-by: Connor Tsui <[email protected]>
WD1 to WD4, CD3, CD3b and the decimal Interleave kernel merged, and CD4, CD5 and WD6 are open drafts. The plan now lists CD3b (#10939) and the Interleave kernel (CD4p, #10940) as dependencies of CD4, and CD3b as a dependency of CD6 and CD7. CD7 merges right after CD5 (#10905). D26 moves to CD6, because CD4 (#10946) adds no serialization lowering: the default writer executes a Widen, and reads of old files are the first ordinary source of one. The CD6 and WR1 briefs now carry that choice. D35 no longer makes WD6 wait for WD5. #10908 joins the follow-up issues, and the plan suggests settling the mechanism of Signed-off-by: Connor Tsui <[email protected]> #10748 before WD5.
Summary
Decimal
Widen, legacy decimal reads and DecimalByteParts splitting need raw extrema before choosing or checking precision. The existing decimal min/max implementation constructs checked scalars, so callers cannot use it directly for values outside the declared precision.Changes
Expose the raw range from the existing pairwise scanner in
aggregate_fn/fns/min_max/decimal.rs. Both the aggregate and new raw-range callers use that implementation. Scalar construction stays in the aggregate layer, and the raw helper ignores null slots without allocating or checking precision.Tests cover all six storage widths, native extrema, null payloads, empty and all-null inputs, and aggregate result dtypes. Benchmarks add wide decimal cases to the existing min/max target. Checks are left to CI.
API Changes
Add public
vortex_array::arrays::decimal::valid_range, re-exported from the existing decimal min/max implementation.