From 51417a5644a8de05da2a0fc6580f9fcc309144d2 Mon Sep 17 00:00:00 2001 From: Daniel King Date: Wed, 2 Oct 2024 09:58:17 -0400 Subject: [PATCH] exclude ALP for now --- bench-vortex/src/lib.rs | 6 +++--- vortex-sampling-compressor/src/compressors/alp.rs | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bench-vortex/src/lib.rs b/bench-vortex/src/lib.rs index 04f8b364db..ee7d4ffc32 100644 --- a/bench-vortex/src/lib.rs +++ b/bench-vortex/src/lib.rs @@ -19,7 +19,7 @@ use vortex::compress::CompressionStrategy; use vortex::{Array, Context, IntoArray}; use vortex_dtype::DType; use vortex_fastlanes::DeltaEncoding; -use vortex_sampling_compressor::compressors::alp::ALPCompressor; +// use vortex_sampling_compressor::compressors::alp::ALPCompressor; use vortex_sampling_compressor::compressors::bitpacked::BitPackedCompressor; use vortex_sampling_compressor::compressors::date_time_parts::DateTimePartsCompressor; use vortex_sampling_compressor::compressors::dict::DictCompressor; @@ -53,8 +53,8 @@ lazy_static! { lazy_static! { pub static ref COMPRESSORS: HashSet> = [ - &ALPCompressor as CompressorRef<'static>, - &DictCompressor, + // &ALPCompressor as CompressorRef<'static>, + &DictCompressor as CompressorRef<'static>, &BitPackedCompressor, &FoRCompressor, &FSSTCompressor, diff --git a/vortex-sampling-compressor/src/compressors/alp.rs b/vortex-sampling-compressor/src/compressors/alp.rs index a0c1ef4f71..4e2d7b6712 100644 --- a/vortex-sampling-compressor/src/compressors/alp.rs +++ b/vortex-sampling-compressor/src/compressors/alp.rs @@ -51,9 +51,11 @@ impl EncodingCompressor for ALPCompressor { let compressed_patches = patches .map(|p| { - ctx.auxiliary("patches") - .excluding(self) - .compress(&p, like.as_ref().and_then(|l| l.child(1))) + ctx.auxiliary("patches").excluding(self).compress( + &p, + like.as_ref() + .and_then(|l| if l.nchildren() >= 2 { l.child(1) } else { None }), + ) }) .transpose()?;