Repository navigation
Add PivcoScheme and ALPRD exponent cascading to BtrBlocks - #12104
lwwmanning wants to merge 8 commits into
Conversation
Signed-off-by: Will Manning <will@willmanning.io>
lwwmanning
left a comment
There was a problem hiding this comment.
Posted by Claude Opus 5.5 on Will's behalf.
Fresh review of 9695eb7e, covering only the changes on top of #12103. I found no blocking issue, and this PR adds no wire ID, edition entry or serialized metadata.
The gating looks right. allowed_schemes drops PivcoScheme unless the session's editions allow vortex.pivco, and CompressionMode::Cuda excludes it by scheme ID and by encoding. ALPRD sends its left_parts codes to Pivco only when Pivco is an eligible scheme. The estimate cannot divide by zero: it skips arrays under 1024 values and arrays with no valid values. Without Pivco, every other scheme is chosen as before.
Notes:
- Writers that use
disable_editions()or.unrestricted()now writevortex.pivco. This matches the documented contract ofdisable_editions(), but please say it in the description. The BtrBlocks compress benchmark uses.unrestricted(), so its CodSpeed numbers will move. - The description says ALPRD pays "zero canonicalization cost" under
compact. With the unstable edition on,compactdoes pay it. - The doc comment "Restrict child 0 to
PivcoScheme" overstates the allowlist:left_partscan still become aConstantArray. ALPRD also callscompress_childdirectly, so aChildPolicysuch asKeepEverythingdoes not apply toleft_parts. evaluate_candidateestimates at 4096-row blocks but may then encode withblock_shift = 11.unreachable!inpivco.rsshould bevortex_panic!(STYLE.md). Theu_okandb_okbranches inaccumulate_slicecannot run after the stats checks.compute_bp_bitsduplicatesbest_bit_widthfrom FastLanes.CascadingCompressor::allowed_schemesis public only for a test.- No test covers the skip paths of the estimate (under 1024 values, no valid values).
With the unstable edition on, the estimate runs on every integer array of 1024 values or more. That may slow compression, but I did not measure it. PivcoSchemeNoFor and the four test-only constructors could go if you want a smaller diff.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
roborev: Combined Review (
|
Merging this PR will not alter performanceWarning vortex-data has exceeded the Hobby plan limit of 5 active contributors. Upgrade your plan or apply to the open source program by December 8, 2026 to keep using CodSpeed. 1 warning
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9695eb7e09
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Polar Signals Profiling ResultsLatest Run
Powered by Polar Signals Cloud |
- Treat empty DescendantAllowlist::allowed lists as unrestricted in CascadingCompressor::is_excluded and clarify Scheme::descendant_allowlists docs - Validate PivcoOptions::block_shift (0 or 10..=13) before shifting in PivcoScheme estimation and compression - Check IntDictScheme eligibility via CascadingCompressor::is_scheme_eligible before capping the competing bit-packing baseline - Replace unreachable! with vortex_panic! in PivcoScheme, clarify ALPRDScheme::descendant_allowlists docs, and add regression tests for skip paths, invalid block_shift, empty allowlists, and dictionary eligibility Signed-off-by: Will Manning <will@spiraldb.com> Co-Authored-By: Will Manning <will@spiraldb.com>
Benchmarks: PolarSignals Profiling 📖Commits: PR
Hot runsEach cell is the hot-run time of this PR
Cold runs (first iteration)
File Size Changes (1 files changed, -0.4% overall, 0↑ 1↓)
Totals:
|
Benchmarks: FineWeb NVMe 📖Commits: PR
How to read the summary
Hot runsEach cell is the hot-run time of this PR
Cold runs (first iteration)
File Size Changes (1 files changed, -0.1% overall, 0↑ 1↓)
Totals:
|
Benchmarks: TPC-H SF=1 on NVME 📖Commits: PR
How to read the summary
Hot runsEach cell is the hot-run time of this PR
Cold runs (first iteration)
File Size Changes (8 files changed, -1.0% overall, 2↑ 6↓)
Totals:
|
Benchmarks: Clickbench on NVME 📖Commits: PR
How to read the summary
Hot runsEach cell is the hot-run time of this PR
Cold runs (first iteration)
File Size Changes (100 files changed, -7.1% overall, 0↑ 100↓)
Totals:
|
Benchmarks: TPC-DS SF=10 on NVME 📖Commits: PR
How to read the summary
Hot runsEach cell is the hot-run time of this PR
Cold runs (first iteration)
File Size Changes (33 files changed, -8.2% overall, 12↑ 21↓)
Totals:
|
Benchmarks: TPC-H SF=10 on NVME 📖Commits: PR
How to read the summary
Hot runsEach cell is the hot-run time of this PR
Cold runs (first iteration)
File Size Changes (16 files changed, -1.0% overall, 2↑ 14↓)
Totals:
|
Benchmarks: TPC-H SF=1 on S3 📖Commits: PR
How to read the summary
Hot runsEach cell is the hot-run time of this PR
Cold runs (first iteration)
|
Benchmarks: TPC-DS SF=1 on NVME 📖Commits: PR
How to read the summary
Hot runsEach cell is the hot-run time of this PR
Cold runs (first iteration)
File Size Changes (24 files changed, -8.3% overall, 12↑ 12↓)
Totals:
|
|
Addressed the review notes in
|
When PivcoScheme estimates inside ZigZag or FoR, IntDictScheme is excluded only as a descendant because it already competes as a sibling at the parent level. Keep the IntDict baseline cap active whenever IntDictScheme is registered in the compressor and not already an ancestor, restoring rejected_decimal_keeps_nested_int_dict in vortex-file. Signed-off-by: Will Manning <will@spiraldb.com> Co-Authored-By: Will Manning <will@spiraldb.com>
Benchmarks: Compression 📖Commits: PR vortex / vortex-file-compressed / ns (1.055x ➖, 2↓ 10↑)
vortex / vortex-file-compressed / bytes (0.946x ➖, 5↓ 0↑)
vortex / vortex-compact / bytes (1.007x ➖, 0↓ 1↑)
vortex / parquet / ns (1.018x ➖, 0↓ 6↑)
vortex / parquet / bytes (1.000x ➖, 0↓ 0↑)
vortex / parquet-snappy / bytes (1.000x ➖, 0↓ 0↑)
vortex / arrow-ipc / ns (0.989x ➖, 1↓ 0↑)
vortex / arrow-ipc / bytes (1.000x ➖, 0↓ 0↑)
|
Benchmarks: Random Access 📖Commits: PR
How to read the summary
vortex / arrow-ipc / ns (0.938x ➖, 2↓ 1↑)
random-access / vortex-file-compressed / ns (0.994x ➖, 0↓ 0↑)
random-access / parquet / ns (1.003x ➖, 0↓ 0↑)
random-access / lance / ns (0.999x ➖, 0↓ 0↑)
random-access / litdata / ns (0.999x ➖, 0↓ 0↑)
|
Signed-off-by: Will Manning <will@spiraldb.com>
Signed-off-by: Will Manning <will@spiraldb.com> Co-Authored-By: Will Manning <will@spiraldb.com>
robert3005
left a comment
There was a problem hiding this comment.
Reviewed the scheme selection, the ALPRD left_parts cascade and the follow-up fixes up to c1b19b7. I found no correctness problems: ALPRD keeps the recompressed left_parts only when it is smaller with the same dtype, and the CUDA ALPRD kernel executes left_parts generically.
nit: the PR adds about 1,960 lines and about 30 test cases, and none is a property test. One hegeltest round trip through PivcoScheme (any integer ptype, nullable or not, FoR on or off) could replace several of the fixed rstest cases in tests.rs. The repo rules ask for less than 500 lines and 20 cases, or a reason to go above these limits.
Signed-off-by: Will Manning <will@spiraldb.com>
…erty Signed-off-by: Will Manning <will@spiraldb.com> Co-Authored-By: Will Manning <will@spiraldb.com>
|
Addressed in |
Signed-off-by: Will Manning <will@spiraldb.com>
This wires
vortex.pivcointoBtrBlocksCompressorviaPivcoScheme(gated onvortex.pivcobeing allowed in the session's enabled editions—so writers usingUNSTABLE,disable_editions(), or.unrestricted()may emitvortex.pivco—and excluded fromCompressionMode::Cudauntil thevortex-cudakernel lands).PivcoSchemeuses single-pass sampledPow2-Binhistogramming throughvortex_pivco::estimate_compressed_bitsto evaluate both unbiasedPivcoand block-narrowedFoR(Pivco), automatically promotingOrderPreservingwavelet trees whenever they fall within0.02 bpvofHuffmanso range predicates stay pushable.ALPRDSchemealso cascades its 3-bitleft_partsexponent-dictionary codes intoPivcoSchemeviaDescendantAllowlistwhenPivcoSchemeis eligible (paying zero canonicalization cost whenevervortex.pivcois not enabled, such as defaultcore,cuda, orcompactwithout the unstable edition).Across 45 benchmark datasets (13.3 GB raw, 451 leaf columns), enabling
PivcoSchemeon top ofFoR.v2 + FloatWidenreduces compressed size by 325.9 MB (-9.8%, adopted on 220/451 columns) while scanning at 19.0 GB/s and serving geomeanscalar_atin 259 ns (21.8× faster thanPco).Authored with AI assistance.