Skip to content

Commit 87a6a95

Browse files
committed
fixup
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
1 parent 7e4fc74 commit 87a6a95

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

encodings/fastlanes/src/lib.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
#![allow(clippy::cast_possible_truncation)]
55

6+
use std::env;
7+
use std::sync::LazyLock;
8+
69
pub use bitpacking::*;
710
pub use delta::*;
811
pub use r#for::*;
@@ -31,9 +34,17 @@ use vortex_array::aggregate_fn::session::AggregateFnSessionExt;
3134
use vortex_array::session::ArraySessionExt;
3235
use vortex_session::VortexSession;
3336

37+
/// Check if we're using experimental patches deserialization
38+
static USE_EXPERIMENTAL_PATCHES: LazyLock<bool> =
39+
LazyLock::new(|| env::var("VORTEX_EXPERIMENTAL_PATCHED_ARRAY").is_ok());
40+
3441
/// Initialize fastlanes encodings in the given session.
3542
pub fn initialize(session: &VortexSession) {
36-
session.arrays().register(BitPacked);
43+
if *USE_EXPERIMENTAL_PATCHES {
44+
session.arrays().register(BitPackedPatchedPlugin);
45+
} else {
46+
session.arrays().register(BitPacked);
47+
}
3748
session.arrays().register(Delta);
3849
session.arrays().register(FoR);
3950
session.arrays().register(RLE);

vortex-file/src/strategy.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@
33

44
//! This module defines the default layout strategy for a Vortex file.
55
6-
use std::env;
76
use std::sync::Arc;
87
use std::sync::LazyLock;
98

109
use vortex_alp::ALP;
11-
// Compressed encodings from encoding crates
12-
// Canonical array encodings from vortex-array
1310
use vortex_alp::ALPRD;
1411
use vortex_array::ArrayId;
1512
use vortex_array::VTable;
@@ -69,10 +66,6 @@ use vortex_zstd::ZstdBuffers;
6966

7067
const ONE_MEG: u64 = 1 << 20;
7168

72-
/// Check if we're using experimental patches deserialization
73-
static USE_EXPERIMENTAL_PATCHES: LazyLock<bool> =
74-
LazyLock::new(|| env::var("VORTEX_EXPERIMENTAL_PATCHED_ARRAY").is_ok());
75-
7669
/// Static registry of all allowed array encodings for file writing.
7770
///
7871
/// This includes all canonical encodings from vortex-array plus all compressed

0 commit comments

Comments
 (0)