Repository navigation
Add Hegel property tests for OnPair, EliasFano, Unary, and ZigZag - #12334
lwwmanning wants to merge 4 commits into
Conversation
Wires OnPair, EliasFano (both Primitive and Unary upper representations), Unary, and ZigZag into the shared Hegel encoding harness so serde, scalar probing, comparisons, and chained slice/take/filter/mask ops are checked differentially across generated inputs. Also adds OnPair Hegel coverage for dense repeated Dict takes and Like pushdown across escaped metacharacters and 254-byte state boundaries, replaces the 100k-row Instant::now() smoke test in encodings/onpair/tests/big_data.rs with a compact corpus roundtrip test, and removes the unused num-traits dependency from vortex-zigzag. Authored with AI assistance (Antigravity / Gemini). Signed-off-by: Will Manning <will@willmanning.io>
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 (
|
lwwmanning
left a comment
There was a problem hiding this comment.
Posted by Claude Opus 5.5 on Will's behalf.
encodings/zigzag/src/compress.rslines 266 to 270: as roborev and Codex noted,assert_arrays_eq!clones its left side. The encoded buffer stays shared, so the in-place decode from #12048 never runs. The block repeats the out-of-place check that the harness already does. Delete it, or decode the encoded array by value and compare the result.encodings/onpair/src/tests.rsline 914: the new corpus test does not replacebig_data.rs. The old test ran 100,000 rows with 32-bit random ids over 13 templates, so the dictionary saw many distinct tokens. The new test runs 2,048 rows with 256 ids over 6 templates.codes_buffer_has_little_spare_capacitystill compresses 8,192 high-entropy rows, so the main loss is scale.- The new test's roundtrip and equality checks repeat
test_onpair_hegel_encoding_harness(line 951), which runs withcompareon. Keepbig_data.rsand delete only itsInstanttiming andeprintln!output. Or delete both tests, and say in the description that the large-corpus coverage is gone.
… test Decode owned_encoded by value before comparing in test_zigzag_hegel_encoding_harness so the uniquely owned in-place decode path is exercised. Restore the 100k-row OnPair big_data smoke test without Instant timing or eprintln output and remove the redundant smaller corpus test. Signed-off-by: Will Manning <will@spiraldb.com> Co-Authored-By: Will Manning <will@spiraldb.com>
|
Addressed the review findings in
|
lwwmanning
left a comment
There was a problem hiding this comment.
Posted by Claude Opus 5.5 on Will's behalf.
Commit fc59145 resolves both points from my earlier review. The ZigZag owned case now decodes by value, so it can reach the in-place path from #12048. big_data.rs is back at 100,000 rows without its timing output, and the smaller duplicate corpus test is gone.
…tions Assert buffer pointer reuse on owned ZigZag decode, exercise OnPair's >= 1024-row TakeExecute specialization in test_onpair_dict_dense_repeated_takes, and assert OnPair LikeKernel pushdown for supported patterns in test_onpair_like_hegel_differential. Signed-off-by: Will Manning <will@spiraldb.com> Co-Authored-By: Will Manning <will@spiraldb.com>
lwwmanning
left a comment
There was a problem hiding this comment.
Posted by Claude Opus 5.5 on Will's behalf.
I checked ed4fe5f. The ZigZag pointer check and the larger OnPair take draws look right.
One point in encodings/onpair/src/compute/like.rs, lines 476 to 491. The new Contains arms assume a 254-byte limit that the kernel does not have. The kernel uses ContainsScan, and in onpair 0.4.1 its limit is 65,535 bytes. The 254-byte limit belongs to ContainsDfa, which the kernel does not call.
A trained dictionary has a token for every byte, so as far as I can tell every Contains pattern that these generators draw pushes down. The pattern_branch == 2 && include_long guard only makes the check narrower. Please merge the three Contains arms into the arm that expects pushdown, and correct the comment about the 254-byte ContainsScan limit at line 409.
ContainsScan supports up to 65,535 bytes and a trained OnPair dictionary covers every byte, so merge the Contains arms into the arm expecting pushdown and fix the comments referencing a 254-byte limit. Signed-off-by: Will Manning <will@spiraldb.com> Co-Authored-By: Will Manning <will@spiraldb.com>
|
Fixed in |
lwwmanning
left a comment
There was a problem hiding this comment.
Posted by Claude Opus 5.5 on Will's behalf.
Commit 1978633 resolves my last review. The property test now requires pushdown for every parsed pattern, the three Contains arms are gone, and the comments no longer mention a 254-byte limit. It also checks that the kernel declines case-insensitive and null patterns, which matches the early returns in the kernel.
Merging this PR will improve performance by 14.43%Warning 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. 2 warnings
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
Wires
OnPair,EliasFano(bothPrimitiveandUnaryupper representations),Unary, andZigZaginto the shared Hegel encoding harness so serde, scalar probing, comparisons, and chainedslice/take/filter/maskops are checked differentially across generated inputs. Also addsOnPairHegel coverage for dense repeatedDicttakes andLikepushdown across escaped metacharacters and longContainsScansubstrings, stripsInstanttiming andeprintln!output from the 100k-row smoke test inencodings/onpair/tests/big_data.rs, and removes the unusednum-traitsdependency fromvortex-zigzag.Authored with AI assistance (Antigravity / Gemini).