Skip to content

Commit e767a30

Browse files
gargiulofrancescojoseph-isaacsclaude
authored
feat(onpair): promote OnPair to a stable read-only encoding (#8872)
## Rationale for this change OnPair has been living under `encodings/experimental/` while it stabilized. We now want OnPair-encoded files to be readable by default, without yet committing to writing them. This PR promotes OnPair to a stable encoding but enables it on the **read path only** — the compressor/writer stays gated behind the `unstable_encodings` feature so we can turn on writing in a follow-up. ## What changes are included in this PR? - Move the crate from `encodings/experimental/onpair` → `encodings/onpair` (100% file renames) and drop it from the "Experimental encodings" group in the workspace `Cargo.toml`. - Register the OnPair reader unconditionally in `register_default_encodings`, so any session can decode OnPair arrays and push down filters against them. - Keep the writer/compressor disabled by default: - `ALLOWED_ENCODINGS` (file write strategy) only inserts OnPair under `#[cfg(feature = "unstable_encodings")]`. - btrblocks `ALL_SCHEMES` and the `onpair` scheme module are gated behind `unstable_encodings`, so the default compressor never selects OnPair. - Tests: - New `default_writer_does_not_allow_onpair` asserts OnPair is absent from the default write allowlist; the reader-registration test asserts OnPair is registered with a Filter execute-parent kernel. - btrblocks scheme-selection tests that exercise writing are gated behind `unstable_encodings` and renamed to make the scope explicit (`test_unstable_all_schemes_includes_onpair`, `test_unstable_default_btrblocks_compressor_selects_onpair`). Verified locally: - Default (reader-only) config: `vortex-onpair`, `vortex-btrblocks`, `vortex-file` — 169 tests passed. - `unstable_encodings` (writer-enabled) config: 176 tests passed (the extra 7 are the feature-gated write-path tests). - `cargo clippy --all-targets --all-features` (affected crates) clean; `cargo +nightly fmt --all` clean; `git diff --check` clean. ## What APIs are changed? Are there any user-facing changes? - The `vortex-onpair` crate moves to `encodings/onpair` (path only; crate name and version are unchanged). - User-facing behavior change: OnPair-encoded files are now **readable by default**. Writing OnPair still requires the `unstable_encodings` feature — no default write behavior changes. --------- Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk> Co-authored-by: Joe Isaacs <joe.isaacs@live.co.uk> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5746d55 commit e767a30

24 files changed

Lines changed: 23 additions & 12 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ members = [
5959
"encodings/zstd",
6060
"encodings/bytebool",
6161
"encodings/parquet-variant",
62-
# Experimental encodings
63-
"encodings/experimental/onpair",
62+
"encodings/onpair",
6463
# Benchmarks
6564
"benchmarks/lance-bench",
6665
"benchmarks/compress-bench",
@@ -307,7 +306,7 @@ vortex-json = { version = "0.1.0", path = "./vortex-json", default-features = fa
307306
vortex-layout = { version = "0.1.0", path = "./vortex-layout", default-features = false }
308307
vortex-mask = { version = "0.1.0", path = "./vortex-mask", default-features = false }
309308
vortex-metrics = { version = "0.1.0", path = "./vortex-metrics", default-features = false }
310-
vortex-onpair = { version = "0.1.0", path = "./encodings/experimental/onpair", default-features = false }
309+
vortex-onpair = { version = "0.1.0", path = "./encodings/onpair", default-features = false }
311310
vortex-parquet-variant = { version = "0.1.0", path = "./encodings/parquet-variant" }
312311
vortex-pco = { version = "0.1.0", path = "./encodings/pco", default-features = false }
313312
vortex-proto = { version = "0.1.0", path = "./vortex-proto", default-features = false }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)