Skip to content

Commit d9f59e9

Browse files
committed
add allowed
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
1 parent 7683590 commit d9f59e9

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

encodings/fastlanes/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use vortex_array::session::ArraySessionExt;
3535
use vortex_session::VortexSession;
3636

3737
/// Check if we're using experimental patches deserialization
38-
static USE_EXPERIMENTAL_PATCHES: LazyLock<bool> =
38+
pub static USE_EXPERIMENTAL_PATCHES: LazyLock<bool> =
3939
LazyLock::new(|| env::var("VORTEX_EXPERIMENTAL_PATCHED_ARRAY").is_ok());
4040

4141
/// Initialize fastlanes encodings in the given session.

vortex-btrblocks/src/schemes/integer.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
//! Integer compression schemes.
55
6-
use std::env;
7-
use std::sync::LazyLock;
8-
96
use vortex_array::ArrayRef;
107
use vortex_array::Canonical;
118
use vortex_array::IntoArray;
@@ -29,6 +26,7 @@ use vortex_error::vortex_err;
2926
use vortex_fastlanes::BitPacked;
3027
use vortex_fastlanes::FoR;
3128
use vortex_fastlanes::FoRArrayExt;
29+
use vortex_fastlanes::USE_EXPERIMENTAL_PATCHES;
3230
use vortex_fastlanes::bitpack_compress::bit_width_histogram;
3331
use vortex_fastlanes::bitpack_compress::bitpack_encode;
3432
use vortex_fastlanes::bitpack_compress::find_best_bit_width;
@@ -285,10 +283,6 @@ impl Scheme for ZigZagScheme {
285283
}
286284
}
287285

288-
// replicated from vortex-file
289-
static USE_EXPERIMENTAL_PATCHES: LazyLock<bool> =
290-
LazyLock::new(|| env::var("VORTEX_EXPERIMENTAL_PATCHED_ARRAY").is_ok());
291-
292286
impl Scheme for BitPackingScheme {
293287
fn scheme_name(&self) -> &'static str {
294288
"vortex.int.bitpacking"

vortex-file/src/strategy.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use vortex_array::arrays::List;
2121
use vortex_array::arrays::ListView;
2222
use vortex_array::arrays::Masked;
2323
use vortex_array::arrays::Null;
24+
use vortex_array::arrays::Patched;
2425
use vortex_array::arrays::Primitive;
2526
use vortex_array::arrays::Struct;
2627
use vortex_array::arrays::VarBin;
@@ -90,6 +91,10 @@ pub static ALLOWED_ENCODINGS: LazyLock<HashSet<ArrayId>> = LazyLock::new(|| {
9091
allowed.insert(Masked.id());
9192
allowed.insert(Dict.id());
9293

94+
if *vortex_fastlanes::USE_EXPERIMENTAL_PATCHES {
95+
allowed.insert(Patched.id());
96+
}
97+
9398
// Compressed encodings from encoding crates
9499
allowed.insert(ALP.id());
95100
allowed.insert(ALPRD.id());

0 commit comments

Comments
 (0)