Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ members = [
"encodings/zstd",
"encodings/bytebool",
"encodings/parquet-variant",
# Experimental encodings
"encodings/experimental/onpair",
"encodings/onpair",
# Benchmarks
"benchmarks/lance-bench",
"benchmarks/compress-bench",
Expand Down Expand Up @@ -307,7 +306,7 @@ vortex-json = { version = "0.1.0", path = "./vortex-json", default-features = fa
vortex-layout = { version = "0.1.0", path = "./vortex-layout", default-features = false }
vortex-mask = { version = "0.1.0", path = "./vortex-mask", default-features = false }
vortex-metrics = { version = "0.1.0", path = "./vortex-metrics", default-features = false }
vortex-onpair = { version = "0.1.0", path = "./encodings/experimental/onpair", default-features = false }
vortex-onpair = { version = "0.1.0", path = "./encodings/onpair", default-features = false }
vortex-parquet-variant = { version = "0.1.0", path = "./encodings/parquet-variant" }
vortex-pco = { version = "0.1.0", path = "./encodings/pco", default-features = false }
vortex-proto = { version = "0.1.0", path = "./vortex-proto", default-features = false }
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 7 additions & 6 deletions vortex-btrblocks/src/schemes/string/scheme_selection_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ fn test_dict_compressed() -> VortexResult<()> {

#[cfg(feature = "unstable_encodings")]
#[test]
fn test_onpair_in_default_scheme_list() {
fn test_unstable_all_schemes_includes_onpair() {
use crate::SchemeExt;
use crate::schemes::string::OnPairScheme;
use crate::schemes::string::onpair::OnPairScheme;

let ids: Vec<_> = crate::ALL_SCHEMES.iter().map(|s| s.id()).collect();
assert!(
Expand All @@ -61,10 +61,11 @@ fn test_onpair_in_default_scheme_list() {

#[cfg(feature = "unstable_encodings")]
#[test]
fn test_onpair_compressed() -> VortexResult<()> {
fn test_unstable_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 by default.
// comparison even though both are registered when `unstable_encodings`
// is enabled.
let mut strings = Vec::with_capacity(1000);
for i in 0..1000 {
strings.push(Some(format!(
Expand All @@ -83,8 +84,8 @@ fn test_onpair_compressed() -> VortexResult<()> {
Ok(())
}

/// FSST is registered in the default scheme list (alongside OnPair), and an
/// FSST-only builder still produces an FSST array.
/// FSST is registered in the default scheme list, and an FSST-only builder
/// still produces an FSST array.
#[test]
fn test_fsst_in_default_scheme_list() -> VortexResult<()> {
use crate::BtrBlocksCompressorBuilder;
Expand Down
3 changes: 1 addition & 2 deletions vortex-file/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ vortex-io = { workspace = true }
vortex-layout = { workspace = true }
vortex-mask = { workspace = true }
vortex-metrics = { workspace = true }
vortex-onpair = { workspace = true, optional = true }
vortex-onpair = { workspace = true }
vortex-pco = { workspace = true }
vortex-runend = { workspace = true }
vortex-scan = { workspace = true }
Expand Down Expand Up @@ -81,7 +81,6 @@ tokio = [
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-onpair",
"dep:vortex-tensor",
"vortex-zstd?/unstable_encodings",
"vortex-btrblocks/unstable_encodings",
Expand Down
14 changes: 13 additions & 1 deletion vortex-file/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ mod forever_constant {
pub fn register_default_encodings(session: &VortexSession) {
vortex_bytebool::initialize(session);
vortex_fsst::initialize(session);
#[cfg(feature = "unstable_encodings")]
vortex_onpair::initialize(session);
vortex_zigzag::initialize(session);

Expand Down Expand Up @@ -201,6 +200,7 @@ mod default_encoding_tests {
use vortex_array::optimizer::kernels::ArrayKernelsExt as _;
use vortex_array::session::ArraySessionExt as _;
use vortex_fsst::FSST;
use vortex_onpair::OnPair;

use crate::register_default_encodings;

Expand All @@ -215,5 +215,17 @@ mod default_encoding_tests {

assert!(session.arrays().registry().find(&FSST.id()).is_some());
assert!(session.kernels().has_execute_parent(Filter.id(), FSST.id()));
assert!(session.arrays().registry().find(&OnPair.id()).is_some());
assert!(
session
.kernels()
.has_execute_parent(Filter.id(), OnPair.id())
);
}

#[cfg(not(feature = "unstable_encodings"))]
#[test]
fn default_writer_does_not_allow_onpair() {
assert!(!crate::ALLOWED_ENCODINGS.contains(&OnPair.id()));
}
}
Loading