Skip to content
Open
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
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ object_store = { version = "0.13.2", default-features = false }
object_store_opendal = "0.57.0"
once_cell = "1.21"
oneshot = { version = "0.2.0", features = ["async"] }
onpair = "0.1.1"
onpair = "0.2.0"
opendal = { version = "0.57.0", default-features = false }
opentelemetry = "0.32.0"
opentelemetry-otlp = "0.32.0"
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/string-bench/src/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use vortex_bench::measurements::CustomUnitMeasurement;
use vortex_fsst::fsst_compress;
use vortex_fsst::fsst_train_compressor;
use vortex_onpair::Config;
use vortex_onpair::DEFAULT_DICT12_CONFIG;
use vortex_onpair::DEFAULT_CONFIG;
use vortex_onpair::MaxDictBits;
use vortex_onpair::onpair_compress;

Expand Down Expand Up @@ -59,7 +59,7 @@ impl DirectCandidate {
})?;
Ok(Self::OnPair(Config {
max_dict_bits,
..DEFAULT_DICT12_CONFIG
..DEFAULT_CONFIG
}))
}

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/string-bench/src/serialized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use vortex_btrblocks::schemes::string::FSSTScheme;
use vortex_btrblocks::schemes::string::NullDominatedSparseScheme;
use vortex_btrblocks::schemes::string::OnPairScheme;
use vortex_btrblocks::schemes::string::StringDictScheme;
use vortex_onpair::DEFAULT_DICT12_CONFIG;
use vortex_onpair::DEFAULT_CONFIG;

use crate::StringColumn;
use crate::StringEncoder;
Expand Down Expand Up @@ -87,7 +87,7 @@ fn serialized_encoder_label(encoder: StringEncoder) -> String {
match encoder {
// The config `OnPairScheme` compresses with. When btrblocks gains a
// configurable budget, pass the benchmark's own config here.
StringEncoder::OnPair => onpair_label(&DEFAULT_DICT12_CONFIG),
StringEncoder::OnPair => onpair_label(&DEFAULT_CONFIG),
StringEncoder::Fsst => encoder.label().to_string(),
}
}
Expand Down
11 changes: 7 additions & 4 deletions encodings/onpair/benches/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use vortex_array::dtype::NativePType;
use vortex_array::dtype::Nullability;
use vortex_buffer::Buffer;
use vortex_mask::Mask;
use vortex_onpair::DEFAULT_DICT12_CONFIG;
use vortex_onpair::DEFAULT_CONFIG;
use vortex_onpair::OnPair;
use vortex_onpair::OnPairArray;
use vortex_onpair::OnPairArraySlotsExt;
Expand Down Expand Up @@ -162,7 +162,7 @@ fn compress(n: usize, shape: Shape, ctx: &mut ExecutionCtx) -> OnPairArray {
strings.iter().map(|s| Some(s.as_bytes())),
DType::Utf8(Nullability::NonNullable),
);
onpair_compress(varbin.as_array(), DEFAULT_DICT12_CONFIG, ctx)
onpair_compress(varbin.as_array(), DEFAULT_CONFIG, ctx)
.unwrap_or_else(|e| panic!("onpair_compress failed: {e}"))
.try_downcast::<OnPair>()
.unwrap_or_else(|array| panic!("expected OnPair array, got {}", array.encoding_id()))
Expand All @@ -181,8 +181,11 @@ fn materialise(arr: &OnPairArray, ctx: &mut ExecutionCtx) -> (DecodeInputs, usiz
let view = arr.as_view();
let dict_offsets = widen::<u32>(view.dict_offsets(), ctx);
let dict_bytes = view.dict_bytes_handle().clone();
CompactDictionaryView::validate(dict_bytes.as_host().as_slice(), dict_offsets.as_slice())
.expect("valid OnPair dictionary");
CompactDictionaryView::validate_safety(
dict_bytes.as_host().as_slice(),
dict_offsets.as_slice(),
)
.expect("valid OnPair dictionary");
let inputs = DecodeInputs {
dict_bytes,
dict_offsets,
Expand Down
Loading
Loading