diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0a843f4429..2067b187266 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -517,21 +517,15 @@ jobs: - uses: ./.github/actions/setup-prebuild with: enable-sccache: "true" - # The golden suite pins the compressor's decisions per feature variant, and the - # variants are mutually exclusive at compile time: the `default` variant only exists - # without `unstable_encodings` (which changes ALL_SCHEMES), so the `--all-features` - # workspace test jobs cannot run it. Run each feature combination explicitly. - - name: Golden corpus (default features) + # The golden suite pins compressor decisions for the core-only and explicitly enabled + # edition configurations. Compact compression additionally needs its optional schemes. + - name: Golden corpus (edition configurations) run: | cargo nextest run --cargo-profile ci --locked --no-fail-fast -p vortex-btrblocks --test golden - - name: Golden corpus (unstable_encodings) + - name: Golden corpus (compact, zstd + pco) run: | cargo nextest run --cargo-profile ci --locked --no-fail-fast -p vortex-btrblocks --test golden \ - --features unstable_encodings - - name: Golden corpus (compact, unstable_encodings + zstd + pco) - run: | - cargo nextest run --cargo-profile ci --locked --no-fail-fast -p vortex-btrblocks --test golden \ - --features unstable_encodings,zstd,pco + --features zstd,pco -E 'test(golden_compact)' build-java: name: "Java" diff --git a/Cargo.lock b/Cargo.lock index 3e8ed089b25..168d2943846 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10717,6 +10717,7 @@ dependencies = [ "vortex-compressor", "vortex-datetime-parts", "vortex-decimal-byte-parts", + "vortex-edition", "vortex-error", "vortex-fastlanes", "vortex-fsst", diff --git a/bench-orchestrator/README.md b/bench-orchestrator/README.md index ecd90e140e4..4ecb233955e 100644 --- a/bench-orchestrator/README.md +++ b/bench-orchestrator/README.md @@ -364,6 +364,6 @@ Benchmarks are built with: - Profile: `release_debug` - RUSTFLAGS: `-C target-cpu=native -C force-frame-pointers=yes` -- Features: `unstable_encodings` +- Features: none This enables native CPU optimizations while preserving debug symbols for profiling. diff --git a/bench-orchestrator/bench_orchestrator/config.py b/bench-orchestrator/bench_orchestrator/config.py index 4aceaa59ac5..10cbcfea81d 100644 --- a/bench-orchestrator/bench_orchestrator/config.py +++ b/bench-orchestrator/bench_orchestrator/config.py @@ -282,7 +282,7 @@ class BuildConfig: profile: str = "release_debug" rustflags: str = "-C target-cpu=native -C force-frame-pointers=yes" - features: tuple[str, ...] = ("unstable_encodings",) + features: tuple[str, ...] = () def get_workspace_root() -> Path: diff --git a/benchmarks/compress-bench/Cargo.toml b/benchmarks/compress-bench/Cargo.toml index 6fb0f24df47..bccf3c9a70f 100644 --- a/benchmarks/compress-bench/Cargo.toml +++ b/benchmarks/compress-bench/Cargo.toml @@ -41,11 +41,6 @@ vortex-cuda = { workspace = true, optional = true } [features] cuda = ["dep:tempfile", "dep:vortex-cuda"] lance = ["dep:lance-bench"] -unstable_encodings = [ - "vortex/unstable_encodings", - "vortex-bench/unstable_encodings", - "vortex-cuda?/unstable_encodings", -] [[bin]] name = "compress-bench" diff --git a/benchmarks/compress-bench/README.md b/benchmarks/compress-bench/README.md index c84f46f5a1b..d309a2122f1 100644 --- a/benchmarks/compress-bench/README.md +++ b/benchmarks/compress-bench/README.md @@ -41,11 +41,11 @@ Both sides therefore decode all the way to device-resident arrays, which is what ```bash cargo run -p compress-bench --profile release_debug \ - --features cuda,unstable_encodings -- --gpu-decompress + --features cuda -- --gpu-decompress # pick the Parquet page codec the GPU file is written with (default: snappy) cargo run -p compress-bench --profile release_debug \ - --features cuda,unstable_encodings -- --gpu-decompress --gpu-parquet-codec zstd + --features cuda -- --gpu-decompress --gpu-parquet-codec zstd ``` ### cuDF @@ -116,7 +116,7 @@ still publishes comparable numbers — it just takes considerably longer: ```bash cargo run -p compress-bench --profile release_debug \ - --features cuda,unstable_encodings -- --gpu-decompress --gpu-verify --iterations 1 + --features cuda -- --gpu-decompress --gpu-verify --iterations 1 ``` Any `--gpu-decompress` run reports on every dataset rather than stopping at the first failure, so diff --git a/benchmarks/datafusion-bench/Cargo.toml b/benchmarks/datafusion-bench/Cargo.toml index cc62efebf1b..73b00b0296c 100644 --- a/benchmarks/datafusion-bench/Cargo.toml +++ b/benchmarks/datafusion-bench/Cargo.toml @@ -58,7 +58,6 @@ custom-labels = { workspace = true } [features] cuda = ["dep:vortex-cuda"] -unstable_encodings = ["vortex/unstable_encodings", "vortex-bench/unstable_encodings"] [lints] workspace = true diff --git a/benchmarks/duckdb-bench/Cargo.toml b/benchmarks/duckdb-bench/Cargo.toml index 212282de7e6..5970978d4f9 100644 --- a/benchmarks/duckdb-bench/Cargo.toml +++ b/benchmarks/duckdb-bench/Cargo.toml @@ -37,7 +37,6 @@ vortex-duckdb = { workspace = true } [features] cuda = ["dep:vortex-cuda"] -unstable_encodings = ["vortex/unstable_encodings", "vortex-bench/unstable_encodings"] [lints] workspace = true diff --git a/benchmarks/lance-bench/Cargo.toml b/benchmarks/lance-bench/Cargo.toml index 37222e74452..ab64908af89 100644 --- a/benchmarks/lance-bench/Cargo.toml +++ b/benchmarks/lance-bench/Cargo.toml @@ -30,9 +30,6 @@ tokio = { workspace = true, features = ["full"] } tracing = { workspace = true } vortex-bench = { workspace = true } -[features] -unstable_encodings = ["vortex-bench/unstable_encodings"] - [lib] test = false diff --git a/benchmarks/random-access-bench/Cargo.toml b/benchmarks/random-access-bench/Cargo.toml index c45c1ac2bff..1aeefd19116 100644 --- a/benchmarks/random-access-bench/Cargo.toml +++ b/benchmarks/random-access-bench/Cargo.toml @@ -27,7 +27,6 @@ vortex-bench = { workspace = true } [features] lance = ["dep:lance-bench"] -unstable_encodings = ["vortex-bench/unstable_encodings"] [[bin]] name = "random-access-bench" diff --git a/benchmarks/string-bench/Cargo.toml b/benchmarks/string-bench/Cargo.toml index eae7d10f3aa..53920beecf4 100644 --- a/benchmarks/string-bench/Cargo.toml +++ b/benchmarks/string-bench/Cargo.toml @@ -32,16 +32,8 @@ vortex-btrblocks = { workspace = true } vortex-fsst = { workspace = true } vortex-onpair = { workspace = true } -[features] -unstable_encodings = [ - "vortex/unstable_encodings", - "vortex-bench/unstable_encodings", - "vortex-btrblocks/unstable_encodings", -] - [[bin]] name = "string-bench" -required-features = ["unstable_encodings"] [lints] workspace = true diff --git a/benchmarks/string-bench/README.md b/benchmarks/string-bench/README.md index 41f52b65fd1..25c8c68462b 100644 --- a/benchmarks/string-bench/README.md +++ b/benchmarks/string-bench/README.md @@ -80,22 +80,22 @@ Input preparation is outside benchmark timing. ```bash # Tracked metrics: size, write, read for every configured column and encoder. -cargo run -p string-bench --profile release_debug --features unstable_encodings +cargo run -p string-bench --profile release_debug # Focus on selected columns or encoders. -cargo run -p string-bench --profile release_debug --features unstable_encodings -- \ +cargo run -p string-bench --profile release_debug -- \ --columns URL --encoders onpair # Add the direct codec microbenchmark. -cargo run -p string-bench --profile release_debug --features unstable_encodings -- \ +cargo run -p string-bench --profile release_debug -- \ --suite both # Emit benchmark-comparator JSONL. -cargo run -p string-bench --profile release_debug --features unstable_encodings -- \ +cargo run -p string-bench --profile release_debug -- \ --display-format gh-json --output-path results.json ``` -Run `cargo run -p string-bench --features unstable_encodings -- --help` for all +Run `cargo run -p string-bench -- --help` for all filters and tuning options. Before timing, the benchmark checks that each requested encoding was produced diff --git a/benchmarks/string-bench/src/lib.rs b/benchmarks/string-bench/src/lib.rs index 957375e93d0..40e73cf4b15 100644 --- a/benchmarks/string-bench/src/lib.rs +++ b/benchmarks/string-bench/src/lib.rs @@ -1,8 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -#![cfg(feature = "unstable_encodings")] - //! String-compression benchmarks for Vortex. //! //! Two intentionally separate suites: diff --git a/encodings/zstd/Cargo.toml b/encodings/zstd/Cargo.toml index 7beacade687..6ab7b2ab31b 100644 --- a/encodings/zstd/Cargo.toml +++ b/encodings/zstd/Cargo.toml @@ -19,10 +19,6 @@ all-features = true [lints] workspace = true -[features] -# This feature enables unstable encodings for which we don't guarantee stability. -unstable_encodings = [] - [dependencies] itertools = { workspace = true } num-traits = { workspace = true } diff --git a/encodings/zstd/src/editions.rs b/encodings/zstd/src/editions.rs index 92f096f8a06..0d9f8590ed9 100644 --- a/encodings/zstd/src/editions.rs +++ b/encodings/zstd/src/editions.rs @@ -33,7 +33,6 @@ pub static DECLARATION: EditionDeclaration = EditionDeclaration { }; #[cfg(test)] -#[cfg(feature = "unstable_encodings")] mod tests { use vortex_edition::EditionError; use vortex_edition::EditionSessionExt; diff --git a/encodings/zstd/src/lib.rs b/encodings/zstd/src/lib.rs index e2067ffa36a..06d68b507e3 100644 --- a/encodings/zstd/src/lib.rs +++ b/encodings/zstd/src/lib.rs @@ -7,8 +7,8 @@ //! trained dictionary across frames. Frame metadata lets slices decompress only the frames that can //! contribute values to the requested row range. //! -//! With the `unstable_encodings` feature, `ZstdBuffers` stores the buffers of another encoding as -//! independently compressed zstd buffers while preserving the inner encoding metadata. +//! [`ZstdBuffers`] stores the buffers of another encoding as independently compressed zstd +//! buffers while preserving the inner encoding metadata. //! //! This crate exposes array encodings only. Compression scheme selection is wired through //! `vortex-btrblocks` and file writing. To deserialize arrays manually, register the encoding in the @@ -24,15 +24,12 @@ pub use array::*; use vortex_array::dtype::proto::dtype as pb; use vortex_array::session::ArraySessionExt; -#[cfg(feature = "unstable_encodings")] use vortex_edition::EditionSessionExt; -#[cfg(feature = "unstable_encodings")] use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_ensure; use vortex_error::vortex_err; use vortex_session::VortexSession; -#[cfg(feature = "unstable_encodings")] pub use zstd_buffers::*; mod array; @@ -40,7 +37,6 @@ mod compute; pub mod editions; mod rules; mod slice; -#[cfg(feature = "unstable_encodings")] mod zstd_buffers; #[cfg(test)] @@ -49,25 +45,22 @@ mod test; /// Register the Zstd encodings and their optional edition with a Vortex session. pub fn initialize(session: &VortexSession) { session.arrays().register(Zstd); - #[cfg(feature = "unstable_encodings")] - { - session.arrays().register(ZstdBuffers); - if session.editions().find(&editions::ZSTD_2026_02).is_none() { - session - .editions() - .declare_family(&editions::FAMILY) - .map_err(|error| vortex_err!("{error}")) - .vortex_expect("Zstd edition family is valid"); - session - .register_edition(&editions::DECLARATION) - .map_err(|error| vortex_err!("{error}")) - .vortex_expect("Zstd edition declaration is valid"); - } + session.arrays().register(ZstdBuffers); + if session.editions().find(&editions::ZSTD_2026_02).is_none() { session - .enable_edition(editions::ZSTD_2026_02) + .editions() + .declare_family(&editions::FAMILY) .map_err(|error| vortex_err!("{error}")) - .vortex_expect("Zstd edition is registered"); + .vortex_expect("Zstd edition family is valid"); + session + .register_edition(&editions::DECLARATION) + .map_err(|error| vortex_err!("{error}")) + .vortex_expect("Zstd edition declaration is valid"); } + session + .enable_edition(editions::ZSTD_2026_02) + .map_err(|error| vortex_err!("{error}")) + .vortex_expect("Zstd edition is registered"); } /// Ensure Vortex metadata agrees with the content size declared by a zstd frame. diff --git a/vortex-bench/Cargo.toml b/vortex-bench/Cargo.toml index 5e1298b3411..dac74dd5829 100644 --- a/vortex-bench/Cargo.toml +++ b/vortex-bench/Cargo.toml @@ -86,6 +86,3 @@ wkb = { workspace = true } insta = { workspace = true } rstest = { workspace = true } tempfile = { workspace = true } - -[features] -unstable_encodings = ["vortex/unstable_encodings"] diff --git a/vortex-bench/src/lib.rs b/vortex-bench/src/lib.rs index 7778742e0b9..ad47f7467f0 100644 --- a/vortex-bench/src/lib.rs +++ b/vortex-bench/src/lib.rs @@ -264,17 +264,9 @@ impl CompactionStrategy { /// Apply the write policy shared by Vortex benchmarks. /// -/// Benchmark builds that enable unstable encodings intentionally exercise all registered array -/// encodings, including those that do not yet belong to an edition. +/// Benchmarks write with the editions enabled on the session, like any other writer. pub fn benchmark_write_options(options: VortexWriteOptions) -> VortexWriteOptions { - #[cfg(feature = "unstable_encodings")] - { - options.disable_editions() - } - #[cfg(not(feature = "unstable_encodings"))] - { - options - } + options } /// Verify that local data has already been prepared for the requested benchmark formats. diff --git a/vortex-btrblocks/Cargo.toml b/vortex-btrblocks/Cargo.toml index 4e22f042adf..0aa7e9669c3 100644 --- a/vortex-btrblocks/Cargo.toml +++ b/vortex-btrblocks/Cargo.toml @@ -29,7 +29,7 @@ vortex-decimal-byte-parts = { workspace = true } vortex-error = { workspace = true } vortex-fastlanes = { workspace = true } vortex-fsst = { workspace = true } -vortex-onpair = { workspace = true, optional = true } +vortex-onpair = { workspace = true } vortex-pco = { workspace = true, optional = true } vortex-runend = { workspace = true } vortex-sequence = { workspace = true } @@ -48,12 +48,11 @@ tpchgen = { workspace = true } tpchgen-arrow = { workspace = true } vortex-array = { workspace = true, features = ["_test-harness"] } vortex-arrow = { workspace = true } +vortex-edition = { workspace = true } vortex-mask = { workspace = true } vortex-session = { workspace = true } [features] -# This feature enabled unstable encodings for which we don't guarantee stability. -unstable_encodings = ["dep:vortex-onpair", "vortex-zstd?/unstable_encodings"] pco = ["dep:pco", "dep:vortex-pco"] zstd = ["dep:vortex-zstd"] diff --git a/vortex-btrblocks/src/builder.rs b/vortex-btrblocks/src/builder.rs index fe8072d5e66..049f8dfbf25 100644 --- a/vortex-btrblocks/src/builder.rs +++ b/vortex-btrblocks/src/builder.rs @@ -37,7 +37,6 @@ pub const ALL_SCHEMES: &[&dyn Scheme] = &[ &integer::SequenceScheme, &integer::IntRLEScheme, // Prefer all other schemes above delta, for now (since its slower to decompress). - #[cfg(feature = "unstable_encodings")] &integer::DeltaScheme::new(1.25), //////////////////////////////////////////////////////////////////////////////////////////////// // Float schemes. @@ -54,7 +53,6 @@ pub const ALL_SCHEMES: &[&dyn Scheme] = &[ // Both string-fragmentation schemes are registered; the sample-based // selector keeps whichever is smaller per column. &string::FSSTScheme, - #[cfg(feature = "unstable_encodings")] &string::OnPairScheme, &string::NullDominatedSparseScheme, //////////////////////////////////////////////////////////////////////////////////////////////// @@ -156,19 +154,15 @@ impl BtrBlocksCompressorBuilder { /// Excludes schemes without CUDA kernel support, keeps FSST for string compression, /// and adds Zstd for binary compression. /// - /// With the `unstable_encodings` feature, buffer-level Zstd compression is used for binary - /// arrays, preserving their buffer layout for zero-conversion GPU decompression. Without it, - /// interleaved binary Zstd compression is used. + /// When Zstd support is present, buffer-level compression preserves binary arrays' buffer + /// layout for zero-conversion GPU decompression. /// /// This preset is intended for files that will be decoded by CUDA kernels. It may choose a /// larger encoded representation than the default compressor. pub fn only_cuda_compatible(self) -> Self { // Keep FSST, which has a CUDA decoder and direct Arrow offset-based export. Other // string fragmentation and dictionary schemes still require unsupported decode paths. - #[cfg_attr( - not(any(feature = "pco", feature = "unstable_encodings")), - allow(unused_mut) - )] + #[cfg_attr(not(any(feature = "pco", feature = "zstd")), allow(unused_mut))] let mut excluded: Vec = vec![ integer::SparseScheme.id(), integer::IntRLEScheme.id(), @@ -183,16 +177,13 @@ impl BtrBlocksCompressorBuilder { // it — the Delta children OnPair emits, for instance — decode there. It stays excluded // from this preset until GPU delta decode is benchmarked against the schemes it would // displace, since the preset picks encodings rather than merely decoding them. - #[cfg(feature = "unstable_encodings")] excluded.push(integer::DeltaScheme::default().id()); #[cfg(feature = "pco")] excluded.extend([integer::PcoScheme.id(), float::PcoScheme.id()]); let builder = self.exclude_schemes(excluded); - #[cfg(all(feature = "zstd", feature = "unstable_encodings"))] + #[cfg(feature = "zstd")] let builder = builder.with_new_scheme(&binary::ZstdBuffersScheme); - #[cfg(all(feature = "zstd", not(feature = "unstable_encodings")))] - let builder = builder.with_new_scheme(&binary::ZstdScheme); builder } diff --git a/vortex-btrblocks/src/canonical_compressor.rs b/vortex-btrblocks/src/canonical_compressor.rs index bddb0be113a..a7850926ac0 100644 --- a/vortex-btrblocks/src/canonical_compressor.rs +++ b/vortex-btrblocks/src/canonical_compressor.rs @@ -264,7 +264,7 @@ mod tests { Ok(()) } - #[cfg(all(feature = "zstd", feature = "unstable_encodings"))] + #[cfg(feature = "zstd")] #[test] fn test_cuda_compatible_binary_zstd_buffers_compressed() -> VortexResult<()> { let values = (0..1024) diff --git a/vortex-btrblocks/src/schemes/binary/mod.rs b/vortex-btrblocks/src/schemes/binary/mod.rs index af66d345cc6..523bfff600e 100644 --- a/vortex-btrblocks/src/schemes/binary/mod.rs +++ b/vortex-btrblocks/src/schemes/binary/mod.rs @@ -5,12 +5,12 @@ #[cfg(feature = "zstd")] mod zstd; -#[cfg(all(feature = "zstd", feature = "unstable_encodings"))] +#[cfg(feature = "zstd")] mod zstd_buffers; // Re-export builtin schemes from vortex-compressor. pub use vortex_compressor::builtins::BinaryDictScheme; #[cfg(feature = "zstd")] pub use zstd::ZstdScheme; -#[cfg(all(feature = "zstd", feature = "unstable_encodings"))] +#[cfg(feature = "zstd")] pub use zstd_buffers::ZstdBuffersScheme; diff --git a/vortex-btrblocks/src/schemes/integer/mod.rs b/vortex-btrblocks/src/schemes/integer/mod.rs index 3aae2ae5601..f9568cfcd1f 100644 --- a/vortex-btrblocks/src/schemes/integer/mod.rs +++ b/vortex-btrblocks/src/schemes/integer/mod.rs @@ -4,7 +4,6 @@ //! Integer compression schemes. mod bitpacking; -#[cfg(feature = "unstable_encodings")] mod delta; mod for_; mod rle; @@ -17,14 +16,12 @@ mod zigzag; mod pco; pub use bitpacking::BitPackingScheme; -#[cfg(feature = "unstable_encodings")] pub use delta::DeltaScheme; pub use for_::FoRScheme; #[cfg(feature = "pco")] pub use pco::PcoScheme; pub use rle::IntRLEScheme; pub(crate) use rle::rle_compress; -#[cfg(feature = "unstable_encodings")] pub(crate) use rle::try_compress_delta; pub use runend::RunEndScheme; pub use sequence::SequenceScheme; diff --git a/vortex-btrblocks/src/schemes/integer/rle.rs b/vortex-btrblocks/src/schemes/integer/rle.rs index 7cda599f5b5..0909e1428d4 100644 --- a/vortex-btrblocks/src/schemes/integer/rle.rs +++ b/vortex-btrblocks/src/schemes/integer/rle.rs @@ -16,16 +16,13 @@ use vortex_compressor::scheme::CompressionEstimate; use vortex_compressor::scheme::DeferredEstimate; use vortex_compressor::scheme::DescendantExclusion; use vortex_compressor::scheme::EstimateVerdict; -#[cfg(feature = "unstable_encodings")] use vortex_compressor::scheme::SchemeId; use vortex_error::VortexResult; -#[cfg(feature = "unstable_encodings")] use vortex_fastlanes::Delta; use vortex_fastlanes::RLE; use vortex_fastlanes::RLEArrayExt; use vortex_fastlanes::RLEArraySlotsExt; -#[cfg(feature = "unstable_encodings")] use super::DeltaScheme; use super::RUN_LENGTH_THRESHOLD; use crate::ArrayAndStats; @@ -69,7 +66,6 @@ pub(crate) fn rle_compress( .execute::(exec_ctx)? .narrow(exec_ctx)?; let rle_indices = rle_indices_primitive.into_array(); - #[cfg(feature = "unstable_encodings")] if compressor.has_scheme(DeltaScheme::default().id()) { try_compress_delta( compressor, @@ -82,8 +78,6 @@ pub(crate) fn rle_compress( } else { compressor.compress_child(&rle_indices, &compress_ctx, scheme.id(), 1, exec_ctx)? } - #[cfg(not(feature = "unstable_encodings"))] - compressor.compress_child(&rle_indices, &compress_ctx, scheme.id(), 1, exec_ctx)? }; let rle_offsets_primitive = rle_array @@ -112,7 +106,6 @@ pub(crate) fn rle_compress( } } -#[cfg(feature = "unstable_encodings")] pub(crate) fn try_compress_delta( compressor: &CascadingCompressor, child: &ArrayRef, diff --git a/vortex-btrblocks/src/schemes/integer/scheme_selection_tests.rs b/vortex-btrblocks/src/schemes/integer/scheme_selection_tests.rs index 1a530c61e72..ecd183b8820 100644 --- a/vortex-btrblocks/src/schemes/integer/scheme_selection_tests.rs +++ b/vortex-btrblocks/src/schemes/integer/scheme_selection_tests.rs @@ -158,7 +158,6 @@ fn test_rle_compressed() -> VortexResult<()> { /// (so Sequence skips), all-unique with no runs (so RunEnd/Dict skip), and a wide absolute range. /// Delta's residuals are far smaller than the FoR span, so Delta should win and round-trip, and /// it must appear at most once in the tree. -#[cfg(feature = "unstable_encodings")] #[test] fn test_delta_compressed() -> VortexResult<()> { let mut ctx = SESSION.create_execution_ctx(); @@ -197,7 +196,6 @@ fn test_delta_compressed() -> VortexResult<()> { /// Same as [`test_delta_compressed`], but with a length that is not a multiple of 1024. /// Zero-padding the trailing chunk used to inflate the delta span and cause DeltaScheme to skip. -#[cfg(feature = "unstable_encodings")] #[test] fn test_delta_compressed_unaligned_length() -> VortexResult<()> { let mut ctx = SESSION.create_execution_ctx(); @@ -231,7 +229,6 @@ fn test_delta_compressed_unaligned_length() -> VortexResult<()> { /// Nullable unaligned monotone must round-trip through Delta (and a cascaded residual). /// /// Mirrors `duckdb/aggregate_pushdown.slt`: `NULL` then `1..=100000` (length 100001). -#[cfg(feature = "unstable_encodings")] #[test] fn test_delta_nullable_unaligned_sum() -> VortexResult<()> { use vortex_array::aggregate_fn::fns::sum::sum; @@ -260,7 +257,6 @@ fn test_delta_nullable_unaligned_sum() -> VortexResult<()> { } /// Returns true if any `Delta` array appears below an ancestor `Delta` in the tree. -#[cfg(feature = "unstable_encodings")] fn has_nested_delta(array: &vortex_array::ArrayRef, under_delta: bool) -> bool { use vortex_fastlanes::Delta; diff --git a/vortex-btrblocks/src/schemes/string/mod.rs b/vortex-btrblocks/src/schemes/string/mod.rs index ac8e5b4b8df..5d04de4777f 100644 --- a/vortex-btrblocks/src/schemes/string/mod.rs +++ b/vortex-btrblocks/src/schemes/string/mod.rs @@ -8,14 +8,12 @@ mod sparse; #[cfg(feature = "zstd")] mod zstd; -#[cfg(all(feature = "zstd", feature = "unstable_encodings"))] +#[cfg(feature = "zstd")] mod zstd_buffers; -#[cfg(feature = "unstable_encodings")] mod onpair; pub use fsst::FSSTScheme; -#[cfg(feature = "unstable_encodings")] pub use onpair::OnPairScheme; pub use sparse::NullDominatedSparseScheme; // Re-export builtin schemes from vortex-compressor. @@ -23,7 +21,7 @@ pub use vortex_compressor::builtins::StringDictScheme; pub use vortex_compressor::stats::StringStats; #[cfg(feature = "zstd")] pub use zstd::ZstdScheme; -#[cfg(all(feature = "zstd", feature = "unstable_encodings"))] +#[cfg(feature = "zstd")] pub use zstd_buffers::ZstdBuffersScheme; #[cfg(test)] diff --git a/vortex-btrblocks/src/schemes/string/scheme_selection_tests.rs b/vortex-btrblocks/src/schemes/string/scheme_selection_tests.rs index ec51c5104bb..aac0b4de4de 100644 --- a/vortex-btrblocks/src/schemes/string/scheme_selection_tests.rs +++ b/vortex-btrblocks/src/schemes/string/scheme_selection_tests.rs @@ -46,9 +46,8 @@ fn test_dict_compressed() -> VortexResult<()> { Ok(()) } -#[cfg(feature = "unstable_encodings")] #[test] -fn test_unstable_all_schemes_includes_onpair() { +fn test_all_schemes_includes_onpair() { use crate::SchemeExt; use crate::schemes::string::onpair::OnPairScheme; @@ -59,13 +58,11 @@ fn test_unstable_all_schemes_includes_onpair() { ); } -#[cfg(feature = "unstable_encodings")] #[test] -fn test_unstable_default_btrblocks_compressor_selects_onpair() -> VortexResult<()> { +fn test_default_btrblocks_compressor_selects_onpair() -> VortexResult<()> { // Dictionary-style string corpus: high lexical overlap, short rows. // OnPair beats FSST on this corpus, so it wins the sample-based - // comparison even though both are registered when `unstable_encodings` - // is enabled. + // comparison even though both are registered. let mut strings = Vec::with_capacity(1000); for i in 0..1000 { strings.push(Some(format!( diff --git a/vortex-btrblocks/src/trace_tests.rs b/vortex-btrblocks/src/trace_tests.rs index 07069f6309a..21e440a7436 100644 --- a/vortex-btrblocks/src/trace_tests.rs +++ b/vortex-btrblocks/src/trace_tests.rs @@ -70,18 +70,15 @@ fn trace_session() -> VortexSession { let session = VortexSession::empty().with::(); vortex_fsst::initialize(&session); - #[cfg(feature = "unstable_encodings")] vortex_onpair::initialize(&session); vortex_zigzag::initialize(&session); + #[cfg(feature = "zstd")] + vortex_zstd::initialize(&session); { let arrays = session.arrays(); #[cfg(feature = "pco")] arrays.register(vortex_pco::Pco); - #[cfg(feature = "zstd")] - arrays.register(vortex_zstd::Zstd); - #[cfg(all(feature = "zstd", feature = "unstable_encodings"))] - arrays.register(vortex_zstd::ZstdBuffers); if use_experimental_patches() { arrays.register(Patched); } @@ -333,8 +330,7 @@ fn trace_scan_compare_on_compressed_shipmode() -> VortexResult<()> { /// Q13-style predicate over the comment column: `l_comment LIKE '%special%'`. /// -/// The column compresses to `fsst -> bitpacked lengths/offsets`, or to `fsst -> delta offsets` -/// (with bitpacked residuals) when `unstable_encodings` makes Delta available. +/// The column compresses to `fsst -> delta offsets` with bitpacked residuals. fn comment_predicate(column: ArrayRef, len: usize) -> VortexResult { Like::try_new( column, @@ -359,17 +355,6 @@ fn trace_scan_like_on_compressed_comment() -> VortexResult<()> { // No reduce rule rewrites a like over FSST; the FSST like kernel compiles the pattern and // matches in compressed space at execution time. insta::assert_snapshot!(optimized.trace.to_string(), @""); - // Delta is only registered under `unstable_encodings`. Without it the offsets stay bitpacked - // and canonicalize inside the FSST kernel, so the scan has no extra children to execute. - #[cfg(not(feature = "unstable_encodings"))] - insta::assert_snapshot!(executed.trace.to_string(), @" - execute_until target=AnyCanonical root=vortex.like(bool, len=4096) - iter 0 current=vortex.like(bool, len=4096) builder_active=false - child_execute_parent session[0]:execute_parent_fn slot=0 parent=vortex.like(bool, len=4096) child=vortex.fsst(utf8, len=4096) -> vortex.bool(bool, len=4096) - iter 1 current=vortex.bool(bool, len=4096) builder_active=false - return output=vortex.bool(bool, len=4096) - "); - #[cfg(feature = "unstable_encodings")] insta::assert_snapshot!(executed.trace.to_string(), @" execute_until target=AnyCanonical root=vortex.like(bool, len=4096) iter 0 current=vortex.like(bool, len=4096) builder_active=false diff --git a/vortex-btrblocks/tests/golden.rs b/vortex-btrblocks/tests/golden.rs index 4f3f4a1d7e2..a04a15acde4 100644 --- a/vortex-btrblocks/tests/golden.rs +++ b/vortex-btrblocks/tests/golden.rs @@ -9,12 +9,12 @@ //! snapshot untouched, so snapshot churn in a later change is the reviewable signal of a //! behavior change. //! -//! Three variants cover the feature matrix: +//! Three variants cover the edition and feature matrix: //! -//! - `default`: the default feature set and [`BtrBlocksCompressor::default`]. -//! - `unstable`: `unstable_encodings` enabled, default builder — pins Delta / OnPair -//! selection (compiled out of `ALL_SCHEMES` otherwise). -//! - `compact`: `unstable_encodings` + `zstd` + `pco`, with +//! - `default`: the schemes permitted by the default `core` edition. +//! - `uneditioned`: every registered scheme, with no edition filter — pins Delta / Patches +//! selection, which belong to no edition. +//! - `compact`: `uneditioned` + `zstd` + `pco`, with //! [`BtrBlocksCompressorBuilder::with_compact`] — pins Zstd / Pco selection. //! //! Every corpus entry is longer than 1024 values so the sampling-based estimation path is @@ -49,8 +49,17 @@ use vortex_array::dtype::Nullability; use vortex_array::extension::datetime::TimeUnit; use vortex_array::validity::Validity; use vortex_btrblocks::BtrBlocksCompressor; +use vortex_btrblocks::BtrBlocksCompressorBuilder; use vortex_buffer::Buffer; +use vortex_edition::ComponentKind; +use vortex_edition::EDITION_DECLARATIONS; +use vortex_edition::EDITION_FAMILIES; +use vortex_edition::EditionId; +use vortex_edition::EditionSession; +use vortex_edition::EditionSessionExt; +use vortex_edition::declarations::core::CORE_2026_08_3; use vortex_error::VortexResult; +use vortex_error::vortex_err; use vortex_session::VortexSession; static SESSION: LazyLock = LazyLock::new(vortex_array::array_session); @@ -375,41 +384,64 @@ fn list_of_int_runs() -> VortexResult { /// Excludes OnPair from the golden compressors: its dictionary training (upstream `onpair` /// crate) iterates randomly-seeded `hashbrown` maps, so its compressed output — and therefore /// its sampled estimate — differs run-to-run. A nondeterministic scheme cannot serve as a -/// golden baseline; excluding it keeps the remaining unstable schemes pinned. -#[cfg(feature = "unstable_encodings")] -fn without_onpair( - builder: vortex_btrblocks::BtrBlocksCompressorBuilder, -) -> vortex_btrblocks::BtrBlocksCompressorBuilder { +/// golden baseline; excluding it keeps the remaining schemes pinned. +fn without_onpair(builder: BtrBlocksCompressorBuilder) -> BtrBlocksCompressorBuilder { use vortex_btrblocks::SchemeExt; use vortex_btrblocks::schemes::string::OnPairScheme; builder.exclude_schemes([OnPairScheme.id()]) } -#[cfg(not(feature = "unstable_encodings"))] +fn edition_session(editions: &[EditionId]) -> VortexResult { + let session = vortex_array::array_session().with::(); + for family in EDITION_FAMILIES { + session + .editions() + .declare_family(family) + .map_err(|error| vortex_err!("{error}"))?; + } + for declaration in EDITION_DECLARATIONS { + session + .register_edition(declaration) + .map_err(|error| vortex_err!("{error}"))?; + } + for edition in editions { + session + .enable_edition(*edition) + .map_err(|error| vortex_err!("{error}"))?; + } + Ok(session) +} + +fn compressor_for_session( + session: &VortexSession, + builder: BtrBlocksCompressorBuilder, +) -> BtrBlocksCompressor { + let allowed = session + .enabled_component_ids(ComponentKind::Array) + .into_iter() + .collect(); + without_onpair(builder) + .retain_allowed_encodings(&allowed) + .build() +} + #[test] fn golden_default() -> VortexResult<()> { - golden_corpus_snapshots("default", &BtrBlocksCompressor::default()) + let session = edition_session(&[CORE_2026_08_3])?; + let compressor = compressor_for_session(&session, BtrBlocksCompressorBuilder::default()); + golden_corpus_snapshots("default", &compressor) } -#[cfg(feature = "unstable_encodings")] #[test] -fn golden_unstable() -> VortexResult<()> { - use vortex_btrblocks::BtrBlocksCompressorBuilder; - - golden_corpus_snapshots( - "unstable", - &without_onpair(BtrBlocksCompressorBuilder::default()).build(), - ) +fn golden_uneditioned() -> VortexResult<()> { + let compressor = without_onpair(BtrBlocksCompressorBuilder::default()).build(); + golden_corpus_snapshots("uneditioned", &compressor) } -#[cfg(all(feature = "unstable_encodings", feature = "zstd", feature = "pco"))] +#[cfg(all(feature = "zstd", feature = "pco"))] #[test] fn golden_compact() -> VortexResult<()> { - use vortex_btrblocks::BtrBlocksCompressorBuilder; - - golden_corpus_snapshots( - "compact", - &without_onpair(BtrBlocksCompressorBuilder::default().with_compact()).build(), - ) + let compressor = without_onpair(BtrBlocksCompressorBuilder::default().with_compact()).build(); + golden_corpus_snapshots("compact", &compressor) } diff --git a/vortex-btrblocks/tests/onpair_roundtrip.rs b/vortex-btrblocks/tests/onpair_roundtrip.rs index 7668a836d86..31734d6a60e 100644 --- a/vortex-btrblocks/tests/onpair_roundtrip.rs +++ b/vortex-btrblocks/tests/onpair_roundtrip.rs @@ -2,11 +2,9 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors // //! End-to-end round-trip through the full Vortex compressor + decompressor -//! on string arrays. Lives in `vortex-btrblocks` (gated on `unstable_encodings`) -//! so it exercises the same code path the file writer uses, not just the -//! OnPair crate in isolation. +//! on string arrays. Lives in `vortex-btrblocks` so it exercises the same code path the file +//! writer uses, not just the OnPair crate in isolation. -#![cfg(feature = "unstable_encodings")] #![allow( clippy::cast_possible_truncation, clippy::tests_outside_test_module, diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__binary_low_cardinality.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__binary_low_cardinality.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__binary_low_cardinality.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__binary_low_cardinality.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__bool_random.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__bool_random.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__bool_random.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__bool_random.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__decimal_prices.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__decimal_prices.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__decimal_prices.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__decimal_prices.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__float_alp_prices.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__float_alp_prices.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__float_alp_prices.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__float_alp_prices.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__float_full_precision.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__float_full_precision.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__float_full_precision.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__float_full_precision.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__float_low_cardinality.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__float_low_cardinality.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__float_low_cardinality.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__float_low_cardinality.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__float_mostly_null.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__float_mostly_null.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__float_mostly_null.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__float_mostly_null.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__int_arithmetic_sequence.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__int_arithmetic_sequence.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__int_arithmetic_sequence.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__int_arithmetic_sequence.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__int_low_cardinality.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__int_low_cardinality.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__int_low_cardinality.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__int_low_cardinality.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__int_monotone_jitter.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__int_monotone_jitter.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__int_monotone_jitter.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__int_monotone_jitter.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__int_mostly_null.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__int_mostly_null.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__int_mostly_null.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__int_mostly_null.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__int_negatives.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__int_negatives.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__int_negatives.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__int_negatives.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__int_runs.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__int_runs.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__int_runs.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__int_runs.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__int_sparse_outliers.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__int_sparse_outliers.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__int_sparse_outliers.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__int_sparse_outliers.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__int_wide_random.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__int_wide_random.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__int_wide_random.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__int_wide_random.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__list_of_int_runs.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__list_of_int_runs.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__list_of_int_runs.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__list_of_int_runs.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__string_fsst_structured.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__string_fsst_structured.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__string_fsst_structured.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__string_fsst_structured.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__string_low_cardinality.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__string_low_cardinality.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__string_low_cardinality.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__string_low_cardinality.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__struct_mixed.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__struct_mixed.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__struct_mixed.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__struct_mixed.snap diff --git a/vortex-btrblocks/tests/snapshots/golden__unstable__temporal_timestamp_micros.snap b/vortex-btrblocks/tests/snapshots/golden__uneditioned__temporal_timestamp_micros.snap similarity index 100% rename from vortex-btrblocks/tests/snapshots/golden__unstable__temporal_timestamp_micros.snap rename to vortex-btrblocks/tests/snapshots/golden__uneditioned__temporal_timestamp_micros.snap diff --git a/vortex-cuda/Cargo.toml b/vortex-cuda/Cargo.toml index 9b231ef39e4..d5237fd1f49 100644 --- a/vortex-cuda/Cargo.toml +++ b/vortex-cuda/Cargo.toml @@ -20,7 +20,6 @@ workspace = true [features] default = [] _test-harness = [] -unstable_encodings = ["vortex/unstable_encodings"] [dependencies] arc-swap = { workspace = true } diff --git a/vortex-cuda/src/executor.rs b/vortex-cuda/src/executor.rs index e5b9d057fe3..a82539c998a 100644 --- a/vortex-cuda/src/executor.rs +++ b/vortex-cuda/src/executor.rs @@ -313,7 +313,6 @@ impl CudaExecutionCtx { } /// Returns the Vortex session backing this CUDA execution context. - #[cfg(feature = "unstable_encodings")] pub(crate) fn session(&self) -> &vortex::session::VortexSession { self.ctx.session() } diff --git a/vortex-cuda/src/hybrid_dispatch/mod.rs b/vortex-cuda/src/hybrid_dispatch/mod.rs index b3a0151a727..d607f9da7d9 100644 --- a/vortex-cuda/src/hybrid_dispatch/mod.rs +++ b/vortex-cuda/src/hybrid_dispatch/mod.rs @@ -297,7 +297,6 @@ mod tests { /// Dict(values=ZstdBuffers(FoR(BP)), codes=FoR(BP)) — ZstdBuffers is /// executed separately, then Dict+FoR+BP fuses with its output as a LOAD. /// 3 launches: nvcomp + fused FoR+BP + fused LOAD+FoR+BP+DICT. - #[cfg(feature = "unstable_encodings")] #[crate::test] async fn test_partial_fusion() -> VortexResult<()> { let mut cpu_ctx = array_session().create_execution_ctx(); diff --git a/vortex-cuda/src/kernel/encodings/mod.rs b/vortex-cuda/src/kernel/encodings/mod.rs index ba4ab51217e..fb292bc445c 100644 --- a/vortex-cuda/src/kernel/encodings/mod.rs +++ b/vortex-cuda/src/kernel/encodings/mod.rs @@ -13,7 +13,6 @@ mod runend; mod sequence; mod zigzag; mod zstd; -#[cfg(feature = "unstable_encodings")] mod zstd_buffers; pub(crate) use alp::ALPExecutor; @@ -34,5 +33,4 @@ pub(crate) use zigzag::ZigZagExecutor; pub(crate) use zstd::ZstdExecutor; pub use zstd::ZstdKernelPrep; pub use zstd::zstd_kernel_prepare; -#[cfg(feature = "unstable_encodings")] pub(crate) use zstd_buffers::ZstdBuffersExecutor; diff --git a/vortex-cuda/src/lib.rs b/vortex-cuda/src/lib.rs index 927859d724e..2447dfdbad5 100644 --- a/vortex-cuda/src/lib.rs +++ b/vortex-cuda/src/lib.rs @@ -56,7 +56,6 @@ use kernel::RunEndExecutor; use kernel::SharedExecutor; pub use kernel::TracingLaunchStrategy; use kernel::ZigZagExecutor; -#[cfg(feature = "unstable_encodings")] use kernel::ZstdBuffersExecutor; use kernel::ZstdExecutor; pub use kernel::ZstdKernelPrep; @@ -92,7 +91,6 @@ use vortex::encodings::runend::RunEnd; use vortex::encodings::sequence::Sequence; use vortex::encodings::zigzag::ZigZag; use vortex::encodings::zstd::Zstd; -#[cfg(feature = "unstable_encodings")] use vortex::encodings::zstd::ZstdBuffers; #[cfg(test)] use vortex_cuda_macros::test; @@ -134,7 +132,6 @@ pub fn initialize_cuda(session: &CudaSession) { session.register_kernel(Sequence.id(), &SequenceExecutor); session.register_kernel(ZigZag.id(), &ZigZagExecutor); session.register_kernel(Zstd.id(), &ZstdExecutor); - #[cfg(feature = "unstable_encodings")] session.register_kernel(ZstdBuffers.id(), &ZstdBuffersExecutor); // Operation kernels diff --git a/vortex-file/Cargo.toml b/vortex-file/Cargo.toml index bddaff61a02..38edd0e26d3 100644 --- a/vortex-file/Cargo.toml +++ b/vortex-file/Cargo.toml @@ -87,9 +87,4 @@ tokio = [ ] wasm-bindgen = ["vortex-layout/wasm-bindgen"] zstd = ["dep:vortex-zstd", "vortex-btrblocks/zstd", "vortex-btrblocks/pco"] -# This feature enables unstable encodings for which we don't guarantee stability. -unstable_encodings = [ - "dep:vortex-tensor", - "vortex-zstd?/unstable_encodings", - "vortex-btrblocks/unstable_encodings", -] +tensor = ["dep:vortex-tensor"] diff --git a/vortex-file/src/lib.rs b/vortex-file/src/lib.rs index 317aade342a..70c08847445 100644 --- a/vortex-file/src/lib.rs +++ b/vortex-file/src/lib.rs @@ -191,7 +191,7 @@ pub fn register_default_encodings(session: &VortexSession) { vortex_sequence::initialize(session); vortex_sparse::initialize(session); - #[cfg(feature = "unstable_encodings")] + #[cfg(feature = "tensor")] vortex_tensor::initialize(session); } diff --git a/vortex-python/src/io.rs b/vortex-python/src/io.rs index b5f2d2bcfbd..9fb0181d739 100644 --- a/vortex-python/src/io.rs +++ b/vortex-python/src/io.rs @@ -17,6 +17,8 @@ use vortex::array::iter::ArrayIterator; use vortex::array::iter::ArrayIteratorAdapter; use vortex::array::iter::ArrayIteratorExt; use vortex::compressor::BtrBlocksCompressorBuilder; +use vortex::editions::ComponentKind; +use vortex::editions::EditionSessionExt; use vortex::error::VortexError; use vortex::error::VortexResult; use vortex::file::WriteOptionsSessionExt; @@ -313,7 +315,7 @@ impl PyVortexWriteOptions { /// >>> vx.io.VortexWriteOptions.default().write(sprl, "chonky.vortex") /// >>> import os /// >>> os.path.getsize('chonky.vortex') - /// 215788 + /// 215820 /// /// Wow, Vortex manages to use about two bytes per integer! So advanced. So tiny. /// @@ -323,7 +325,7 @@ impl PyVortexWriteOptions { /// /// >>> vx.io.VortexWriteOptions.compact().write(sprl, "tiny.vortex") /// >>> os.path.getsize('tiny.vortex') - /// 54992 + /// 55024 /// /// Random numbers are not (usually) composed of random bytes! #[staticmethod] @@ -378,11 +380,16 @@ impl PyVortexWriteOptions { ) -> PyVortexResult<()> { let session = session(); py.detach(|| { - let mut strategy = WriteStrategyBuilder::default(); + let allowed_encodings = session + .enabled_component_ids(ComponentKind::Array) + .into_iter() + .collect(); + let mut compressor = BtrBlocksCompressorBuilder::default(); if self.use_compact_encodings { - strategy = strategy - .with_btrblocks_builder(BtrBlocksCompressorBuilder::default().with_compact()); + compressor = compressor.with_compact(); } + let strategy = WriteStrategyBuilder::default() + .with_btrblocks_builder(compressor.retain_allowed_encodings(&allowed_encodings)); let strategy = strategy.build(); current_runtime().block_on(async move { match resolve_store(path, store.map(|x| x.into_inner()))? { diff --git a/vortex-tui/Cargo.toml b/vortex-tui/Cargo.toml index 5f9258d3ce7..969ed68fd05 100644 --- a/vortex-tui/Cargo.toml +++ b/vortex-tui/Cargo.toml @@ -30,7 +30,6 @@ native = [ "vortex/tokio", "vortex/zstd", ] -unstable_encodings = ["vortex/unstable_encodings"] [lib] crate-type = ["cdylib", "rlib"] diff --git a/vortex-tui/src/convert.rs b/vortex-tui/src/convert.rs index bf56a38763f..ab316982b27 100644 --- a/vortex-tui/src/convert.rs +++ b/vortex-tui/src/convert.rs @@ -14,6 +14,8 @@ use tokio::fs::File; use tokio::io::AsyncWriteExt; use vortex::array::stream::ArrayStreamAdapter; use vortex::compressor::BtrBlocksCompressorBuilder; +use vortex::editions::ComponentKind; +use vortex::editions::EditionSessionExt; use vortex::error::VortexExpect; use vortex::error::vortex_err; use vortex::file::WriteOptionsSessionExt; @@ -96,11 +98,16 @@ pub async fn exec_convert(session: &VortexSession, flags: ConvertArgs) -> anyhow .boxed(); } - let mut strategy = WriteStrategyBuilder::default(); + let allowed_encodings = session + .enabled_component_ids(ComponentKind::Array) + .into_iter() + .collect(); + let mut compressor = BtrBlocksCompressorBuilder::default(); if matches!(flags.strategy, Strategy::Compact) { - strategy = - strategy.with_btrblocks_builder(BtrBlocksCompressorBuilder::default().with_compact()); + compressor = compressor.with_compact(); } + let strategy = WriteStrategyBuilder::default() + .with_btrblocks_builder(compressor.retain_allowed_encodings(&allowed_encodings)); let mut file = File::create(output_path).await?; session diff --git a/vortex/Cargo.toml b/vortex/Cargo.toml index e90f6f6e8e7..8a8a92e43ee 100644 --- a/vortex/Cargo.toml +++ b/vortex/Cargo.toml @@ -16,9 +16,6 @@ version = { workspace = true } [package.metadata.docs.rs] all-features = true -[package.metadata.cargo-shear] -ignored = ["vortex-tensor"] - [lints] workspace = true @@ -89,6 +86,7 @@ tokio = [ "vortex-layout/tokio", ] zstd = ["dep:vortex-zstd", "vortex-file?/zstd"] +tensor = ["dep:vortex-tensor", "vortex-file?/tensor"] wasm-bindgen = [ "vortex-file?/wasm-bindgen", "vortex-io/wasm-bindgen", @@ -98,13 +96,6 @@ pretty = ["vortex-array/table-display"] serde = ["vortex-array/serde", "vortex-buffer/serde", "vortex-mask/serde"] # Exposes experimental row-function APIs without compatibility guarantees. unstable_row_fns = ["vortex-array/unstable_row_fns"] -# This feature enabled unstable encodings for which we don't guarantee stability. -unstable_encodings = [ - "dep:vortex-tensor", - "vortex-btrblocks/unstable_encodings", - "vortex-file?/unstable_encodings", - "vortex-zstd?/unstable_encodings", -] [[bench]] name = "single_encoding_throughput" diff --git a/vortex/src/editions/mod.rs b/vortex/src/editions/mod.rs index 320cb071a16..464cce2197b 100644 --- a/vortex/src/editions/mod.rs +++ b/vortex/src/editions/mod.rs @@ -14,10 +14,9 @@ //! choose a wire representation independently of the enabled editions; the serialization context //! rejects an ID that is not permitted unless the writer explicitly disables edition enforcement. //! -//! The default file writer resolves the session's enabled editions at write time. The -//! facade enables [`crate::editions::CORE_2026_08_3`] and -//! additionally enables the `preview` edition when the -//! `unstable_encodings` feature is selected. +//! The default file writer resolves the session's enabled editions at write time. The facade +//! enables the newest frozen `core` edition, [`crate::editions::CORE_2026_08_3`]. Other editions +//! must be enabled explicitly or by initializing their owning plugin. #[cfg(test)] mod tests; @@ -51,8 +50,7 @@ use vortex_session::VortexSession; /// The `core` edition enabled for writing by the default Vortex session. pub const DEFAULT_CORE_EDITION: EditionId = CORE_2026_08_3; -/// The `preview` edition enabled for writing by the default Vortex session when the -/// `unstable_encodings` feature is selected. +/// The newest `preview` edition. The default Vortex session registers it but does not enable it. pub const DEFAULT_PREVIEW_EDITION: EditionId = PREVIEW_2026_08_0; /// Register the Vortex edition families and declarations with the session's @@ -75,18 +73,11 @@ pub fn register_default_editions(session: &VortexSession) { /// Enable the default Vortex editions for writing. /// -/// This selects the default `core` edition and, when configured, the `preview` edition. All -/// declarations must have been registered first with -/// [`register_default_editions`]. +/// This selects the newest frozen `core` edition. All declarations must have been registered +/// first with [`register_default_editions`]. pub fn enable_default_editions(session: &VortexSession) { session .enable_edition(DEFAULT_CORE_EDITION) .map_err(|e| vortex_err!("{e}")) .vortex_expect("default core edition is registered"); - - #[cfg(feature = "unstable_encodings")] - session - .enable_edition(DEFAULT_PREVIEW_EDITION) - .map_err(|e| vortex_err!("{e}")) - .vortex_expect("feature edition is registered"); } diff --git a/vortex/src/editions/tests.rs b/vortex/src/editions/tests.rs index f3cbedc9ffb..e501466c795 100644 --- a/vortex/src/editions/tests.rs +++ b/vortex/src/editions/tests.rs @@ -217,9 +217,6 @@ fn default_session_enables_the_write_editions() { .contains(&Id::from("vortex.pco")) ); - #[cfg(feature = "unstable_encodings")] - assert!(enabled.contains(&DEFAULT_PREVIEW_EDITION)); - #[cfg(not(feature = "unstable_encodings"))] assert!(!enabled.contains(&DEFAULT_PREVIEW_EDITION)); }