Skip to content

Build DecimalByteParts from the canonical decimal array - #10992

Closed
connortsui20 wants to merge 4 commits into
ct/dbp-canonical-decodefrom
ct/dbp-scheme-canonical
Closed

connortsui20 wants to merge 4 commits into
ct/dbp-canonical-decodefrom
ct/dbp-scheme-canonical

Conversation

@connortsui20

@connortsui20 connortsui20 commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Summary

The DecimalByteParts scheme narrowed the decimal leaf itself with narrowed_decimal, which breaks the rule that every decimal leaf has the canonical width of its precision. narrowed_decimal also counted null slots, so a large value in a null slot could force lower parts that the precision does not allow, which #10905 now rejects. Choosing the split from the valid values of the canonical array avoids both problems.

Changes

Only an MSP without lower parts narrows, so the multipart output does not change. The v1 format cannot carry lower parts, so in v1 mode a precision 39 to 76 column whose values need more than 64 bits is written as a plain i256 leaf instead of a narrowed i128 one. That cost is accepted until vortex.widen and DecimalByteParts v2 enter core (#10733). The golden corpus pins this and the one other output change: ignoring null payloads gives decimal_null_slot_values an i32 MSP instead of i64.

API Changes

split_decimal takes an explicit lower-part count from lower_part_count, and narrowed_decimal is removed, since this scheme was its only caller.

@connortsui20
connortsui20 added this pull request to stack #10993 October 29, 2026 19:40
@connortsui20 connortsui20 added the changelog/break A breaking API change label Oct 29, 2026
@connortsui20 connortsui20 changed the title ct/dbp scheme canonical Build DecimalByteParts from the canonical decimal array Oct 29, 2026
@codspeed

codspeed Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 10.1%

1 warning

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚡ 1 improved benchmark
❌ 5 regressed benchmarks
✅ 1768 untouched benchmarks
⏩ 47 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ CPU Simulation missing_stats[16] 75.8 µs 93 µs -18.49%
❌ CPU Simulation bench_compare_varbin[(50000, 2)] 144.3 µs 173.4 µs -16.81%
❌ CPU Simulation encode_primitives[f32, (2000, 2)] 183.9 µs 211.8 µs -13.17%
❌ CPU Simulation bench_compare_sliced_dict_varbinview[(1000, 10000)] 92.4 µs 104.7 µs -11.82%
❌ CPU Simulation bench_compare_sliced_dict_varbinview[(9999, 10000)] 217.2 µs 244.8 µs -11.3%
⚡ CPU Simulation take_filter_primitive_small_uncached_random_mask_random_indices[4096, 10] 29.4 µs 25.7 µs +14.67%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ct/dbp-scheme-canonical (616db28) with ct/dbp-canonical-decode (490ca09)

Open in CodSpeed

Footnotes

  1. 47 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@connortsui20
connortsui20 force-pushed the ct/dbp-scheme-canonical branch from d918e63 to 883898f Compare October 29, 2026 20:21
@connortsui20
connortsui20 removed this pull request from stack #10993 October 29, 2026 21:29
@connortsui20
connortsui20 force-pushed the ct/dbp-scheme-canonical branch from 883898f to 53dd750 Compare October 29, 2026 21:33
@connortsui20
connortsui20 added this pull request to stack #11008 October 29, 2026 21:33
@connortsui20
connortsui20 force-pushed the ct/dbp-scheme-canonical branch from 53dd750 to ee8c55e Compare October 30, 2026 17:50
@connortsui20
connortsui20 force-pushed the ct/dbp-scheme-canonical branch from ee8c55e to c07e3f0 Compare October 30, 2026 19:28
@connortsui20
connortsui20 force-pushed the ct/dbp-scheme-canonical branch from c07e3f0 to 4835d5f Compare November 2, 2026 16:57
@connortsui20
connortsui20 force-pushed the ct/dbp-scheme-canonical branch 2 times, most recently from 421beab to 754edcb Compare November 2, 2026 17:24
@connortsui20
connortsui20 force-pushed the ct/dbp-scheme-canonical branch from 754edcb to bae1c1a Compare November 2, 2026 19:24
@connortsui20
connortsui20 force-pushed the ct/dbp-scheme-canonical branch 2 times, most recently from aac924d to bde9af6 Compare November 2, 2026 20:25
@connortsui20
connortsui20 force-pushed the ct/dbp-scheme-canonical branch 2 times, most recently from 7329bc1 to 89876f7 Compare November 3, 2026 13:20
@connortsui20
connortsui20 force-pushed the ct/dbp-scheme-canonical branch 2 times, most recently from 1a0701d to c9ebb01 Compare November 3, 2026 14:52
@connortsui20
connortsui20 force-pushed the ct/dbp-scheme-canonical branch from c9ebb01 to aa5461c Compare November 3, 2026 15:12
@connortsui20
connortsui20 force-pushed the ct/dbp-scheme-canonical branch from aa5461c to f814097 Compare November 3, 2026 16:31
@connortsui20
connortsui20 force-pushed the ct/dbp-scheme-canonical branch from f814097 to 9b15bfe Compare November 3, 2026 21:25
@connortsui20
connortsui20 force-pushed the ct/dbp-scheme-canonical branch from 9b15bfe to 616db28 Compare November 4, 2026 19:52
@connortsui20
connortsui20 marked this pull request as ready for review November 4, 2026 20:20
@connortsui20
connortsui20 marked this pull request as draft November 4, 2026 22:02
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
@connortsui20
connortsui20 force-pushed the ct/dbp-scheme-canonical branch from 616db28 to 3ce38db Compare November 5, 2026 20:27
@connortsui20

Copy link
Copy Markdown
Member Author

I have been redesigning this, so this is no longer the change I want to make.

@connortsui20
connortsui20 deleted the ct/dbp-scheme-canonical branch November 5, 2026 21:44
connortsui20 added a commit that referenced this pull request Nov 5, 2026
Record the 2026-11-05 decision: the MSP keeps the canonical width, capped
at i64, and a narrower MSP is an integer Widen, so decoding needs no scan.
#10905 and #10992 closed, LT2 is dropped, and LT3 is required and lands
first.

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/break A breaking API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant