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 <connor.tsui20@gmail.com>
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 <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
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.