-
Notifications
You must be signed in to change notification settings - Fork 161
feat: add experimental onpair string encoding
#8144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
94be61d
Add experimental OnPair string encoding backed by the onpair crate
joseph-isaacs 383ef64
Clean up onpair encoding: drop dead public API and stale comments
joseph-isaacs 5d03b9e
fix
joseph-isaacs 0dc843c
fix
joseph-isaacs 4ca21b8
fix
joseph-isaacs 75f735c
fix
joseph-isaacs a21ea30
onpair: delegate decompression to the upstream onpair crate
joseph-isaacs 3c6006a
fix
joseph-isaacs 9e98f0c
Merge branch 'develop' into onpair-encoding
joseph-isaacs 72ae5c7
Merge branch 'develop' into onpair-encoding
joseph-isaacs 5b4b047
onpair: canonicalise offsets children before widening in decode
joseph-isaacs 6bc07df
onpair: add regression test reproducing the delta dict_offsets panic
joseph-isaacs 3baf1b9
fastlanes: don't widen Delta in place during cast (root cause of onpa…
joseph-isaacs d31e4a7
fix
joseph-isaacs 467d976
fastlanes: silence unused import after disabling Delta cast rule
joseph-isaacs 23d714b
Merge remote-tracking branch 'origin/develop' into onpair-encoding
joseph-isaacs 5a13e8e
fix
joseph-isaacs 9be635b
fix
joseph-isaacs 3b3a169
fix
joseph-isaacs 4de0ec1
fix
joseph-isaacs 9259c56
fix
joseph-isaacs 69d801e
fix
joseph-isaacs 4b7af85
fix
joseph-isaacs e5aca42
perf
joseph-isaacs 080da5b
perf
joseph-isaacs 99ed3f4
perf
joseph-isaacs b173497
perf
joseph-isaacs 8baa429
fix
joseph-isaacs 95ee612
fix
joseph-isaacs da168c8
fix
joseph-isaacs ad34bb4
fix
joseph-isaacs 860ad35
Merge remote-tracking branch 'origin/develop' into onpair-encoding
joseph-isaacs 93749a8
Merge remote-tracking branch 'origin/develop' into onpair-encoding
joseph-isaacs 1ac09f4
fix
joseph-isaacs 7b86a0f
fix
joseph-isaacs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| [package] | ||
| name = "vortex-onpair" | ||
| authors = { workspace = true } | ||
| categories = { workspace = true } | ||
| description = "Vortex OnPair string array encoding (dict-12, pushdown predicates)" | ||
| edition = { workspace = true } | ||
| homepage = { workspace = true } | ||
| include = { workspace = true } | ||
| keywords = { workspace = true } | ||
| license = { workspace = true } | ||
| readme = "README.md" | ||
| repository = { workspace = true } | ||
| rust-version = { workspace = true } | ||
| version = { workspace = true } | ||
|
|
||
| [lints] | ||
| workspace = true | ||
|
|
||
| [dependencies] | ||
| memchr = { workspace = true } | ||
| num-traits = { workspace = true } | ||
| onpair = { workspace = true } | ||
| prost = { workspace = true } | ||
| vortex-array = { workspace = true } | ||
| vortex-buffer = { workspace = true } | ||
| vortex-error = { workspace = true } | ||
| vortex-mask = { workspace = true } | ||
| vortex-session = { workspace = true } | ||
|
|
||
| [features] | ||
| _test-harness = ["vortex-array/_test-harness"] | ||
|
|
||
| [dev-dependencies] | ||
| divan = { workspace = true } | ||
| rstest = { workspace = true } | ||
| vortex-array = { workspace = true, features = ["_test-harness"] } | ||
|
|
||
| [[bench]] | ||
| name = "decode" | ||
| harness = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Vortex OnPair | ||
|
|
||
| A Vortex Encoding for Binary and Utf8 data that uses the | ||
| [OnPair][onpair] short-string compression algorithm. OnPair is a | ||
| dictionary-based encoder with fast per-row random access. | ||
|
|
||
| The trainer / encoder lives in the standalone [`onpair`][onpair-crate] | ||
| crate; this crate wraps the resulting column as a Vortex array with | ||
| cascading-compressor support on every integer child. | ||
|
|
||
| ## Compute | ||
|
|
||
| Like the FSST encoding, this crate provides `cast` and `filter` | ||
| pushdown. Other operators fall back to ordinary decompression. | ||
|
|
||
| ## Default Configuration | ||
|
|
||
| The default training preset is **dict-12**: 12 bits per token, | ||
| dictionary capped at 4 096 entries. Token codes are stored as a | ||
| `PrimitiveArray<u16>`; downstream `FastLanes::BitPacking` losslessly | ||
| narrows the child to exactly `bits`-bit codes on disk. | ||
|
|
||
| ## Layout | ||
|
|
||
| - Buffer 0 — `dict_bytes`: dictionary blob built by the OnPair trainer, | ||
| padded with `MAX_TOKEN_SIZE` trailing zero bytes so the over-copy | ||
| decoder can read 16 bytes past the last token. | ||
| - Slot 0 — `dict_offsets`: `PrimitiveArray<u32>`, len `dict_size + 1`. | ||
| - Slot 1 — `codes`: `PrimitiveArray<u16>`, length `total_tokens`. | ||
| - Slot 2 — `codes_offsets`: `PrimitiveArray<u32>`, length `num_rows + 1`. | ||
| - Slot 3 — `uncompressed_lengths`: integer `PrimitiveArray`, length | ||
| `num_rows`. | ||
| - Slot 4 — optional validity child. | ||
|
|
||
| All four integer slot children flow through the standard cascading | ||
| compressor pipeline (FoR / BitPacking / RunEnd / etc.). | ||
|
|
||
| [onpair]: https://arxiv.org/abs/2508.02280 | ||
| [onpair-crate]: https://github.com/spiraldb/onpair |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't have git dependencies in the trees of published crates.