File tree Expand file tree Collapse file tree
vortex-array/src/arrays/patched
vortex-btrblocks/src/schemes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ pub use alp_rd::*;
2121use vortex_array:: aggregate_fn:: AggregateFnVTable ;
2222use vortex_array:: aggregate_fn:: fns:: nan_count:: NanCount ;
2323use vortex_array:: aggregate_fn:: session:: AggregateFnSessionExt ;
24+ use vortex_array:: arrays:: patched:: USE_EXPERIMENTAL_PATCHES ;
2425use vortex_array:: session:: ArraySessionExt ;
25- use vortex_fastlanes:: USE_EXPERIMENTAL_PATCHES ;
2626use vortex_session:: VortexSession ;
2727
2828mod alp;
Original file line number Diff line number Diff line change 33
44#![ allow( clippy:: cast_possible_truncation) ]
55
6- use std:: env;
7- use std:: sync:: LazyLock ;
8-
96pub use bitpacking:: * ;
107pub use delta:: * ;
118pub use r#for:: * ;
@@ -31,19 +28,10 @@ use vortex_array::aggregate_fn::AggregateFnVTable;
3128use vortex_array:: aggregate_fn:: fns:: is_constant:: IsConstant ;
3229use vortex_array:: aggregate_fn:: fns:: is_sorted:: IsSorted ;
3330use vortex_array:: aggregate_fn:: session:: AggregateFnSessionExt ;
31+ use vortex_array:: arrays:: patched:: USE_EXPERIMENTAL_PATCHES ;
3432use vortex_array:: session:: ArraySessionExt ;
3533use vortex_session:: VortexSession ;
3634
37- /// Flag indicating if experimental patched array support is enabled.
38- ///
39- /// This is set using the environment variable `VORTEX_EXPERIMENTAL_PATCHED_ARRAY`.
40- ///
41- /// When this is true, any BitPacked array with interior patches will be read as a `Patched`
42- /// array, and the builtin compressor will use Patched array with BitPacked instead of
43- /// BitPacked array with interior patches.
44- pub static USE_EXPERIMENTAL_PATCHES : LazyLock < bool > =
45- LazyLock :: new ( || env:: var ( "VORTEX_EXPERIMENTAL_PATCHED_ARRAY" ) . is_ok ( ) ) ;
46-
4735/// Initialize fastlanes encodings in the given session.
4836pub fn initialize ( session : & VortexSession ) {
4937 // If we're using the experimental Patched encoding, register a shim
Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ mod array;
7171mod compute;
7272mod vtable;
7373
74+ use std:: env;
75+ use std:: sync:: LazyLock ;
76+
7477pub use array:: * ;
7578use vortex_buffer:: ByteBuffer ;
7679pub use vtable:: * ;
@@ -96,3 +99,14 @@ const fn patch_lanes<V: Sized>() -> usize {
9699 // from shared to global memory.
97100 if size_of :: < V > ( ) < 8 { 32 } else { 16 }
98101}
102+
103+ /// Flag indicating if experimental patched array support is enabled.
104+ ///
105+ /// This is set using the environment variable `VORTEX_EXPERIMENTAL_PATCHED_ARRAY`.
106+ ///
107+ /// When this is true, any arrays with interior `Patches` will be read as a `Patched`
108+ /// array, and eliminate the interior patches.
109+ ///
110+ /// The builtin compressor will also generate Patched arrays.
111+ pub static USE_EXPERIMENTAL_PATCHES : LazyLock < bool > =
112+ LazyLock :: new ( || env:: var ( "VORTEX_EXPERIMENTAL_PATCHED_ARRAY" ) . is_ok ( ) ) ;
Original file line number Diff line number Diff line change @@ -17,14 +17,14 @@ use vortex_array::LEGACY_SESSION;
1717use vortex_array:: ToCanonical ;
1818use vortex_array:: VortexSessionExecute ;
1919use vortex_array:: arrays:: Patched ;
20+ use vortex_array:: arrays:: patched:: USE_EXPERIMENTAL_PATCHES ;
2021use vortex_array:: arrays:: primitive:: PrimitiveArrayExt ;
2122use vortex_array:: dtype:: PType ;
2223use vortex_compressor:: estimate:: CompressionEstimate ;
2324use vortex_compressor:: scheme:: ChildSelection ;
2425use vortex_compressor:: scheme:: DescendantExclusion ;
2526use vortex_error:: VortexResult ;
2627use vortex_error:: vortex_panic;
27- use vortex_fastlanes:: USE_EXPERIMENTAL_PATCHES ;
2828use vortex_sparse:: Sparse ;
2929
3030use super :: integer:: SparseScheme as IntSparseScheme ;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ use vortex_array::ToCanonical;
1111use vortex_array:: VortexSessionExecute ;
1212use vortex_array:: arrays:: ConstantArray ;
1313use vortex_array:: arrays:: Patched ;
14+ use vortex_array:: arrays:: patched:: USE_EXPERIMENTAL_PATCHES ;
1415use vortex_array:: arrays:: primitive:: PrimitiveArrayExt ;
1516use vortex_array:: scalar:: Scalar ;
1617use vortex_compressor:: builtins:: FloatDictScheme ;
@@ -32,7 +33,6 @@ use vortex_fastlanes::FoR;
3233use vortex_fastlanes:: FoRArrayExt ;
3334use vortex_fastlanes:: RLE ;
3435use vortex_fastlanes:: RLEArrayExt ;
35- use vortex_fastlanes:: USE_EXPERIMENTAL_PATCHES ;
3636use vortex_fastlanes:: bitpack_compress:: bit_width_histogram;
3737use vortex_fastlanes:: bitpack_compress:: bitpack_encode;
3838use vortex_fastlanes:: bitpack_compress:: find_best_bit_width;
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ use vortex_array::arrays::Primitive;
2626use vortex_array:: arrays:: Struct ;
2727use vortex_array:: arrays:: VarBin ;
2828use vortex_array:: arrays:: VarBinView ;
29+ use vortex_array:: arrays:: patched:: USE_EXPERIMENTAL_PATCHES ;
2930use vortex_array:: dtype:: FieldPath ;
3031use vortex_btrblocks:: BtrBlocksCompressorBuilder ;
3132use vortex_btrblocks:: SchemeExt ;
@@ -91,7 +92,7 @@ pub static ALLOWED_ENCODINGS: LazyLock<HashSet<ArrayId>> = LazyLock::new(|| {
9192 allowed. insert ( Masked . id ( ) ) ;
9293 allowed. insert ( Dict . id ( ) ) ;
9394
94- if * vortex_fastlanes :: USE_EXPERIMENTAL_PATCHES {
95+ if * USE_EXPERIMENTAL_PATCHES {
9596 allowed. insert ( Patched . id ( ) ) ;
9697 }
9798
You can’t perform that action at this time.
0 commit comments