Skip to content

Commit 3e9185d

Browse files
committed
Core change
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent 67a2b22 commit 3e9185d

161 files changed

Lines changed: 619 additions & 720 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

encodings/alp/benches/alp_compress.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use vortex_array::IntoArray;
1919
use vortex_array::VortexSessionExecute;
2020
use vortex_array::arrays::PrimitiveArray;
2121
use vortex_array::dtype::NativePType;
22-
use vortex_array::session::ArraySession;
2322
use vortex_array::validity::Validity;
2423
use vortex_buffer::Buffer;
2524
use vortex_buffer::buffer;
@@ -51,8 +50,7 @@ const BENCH_ARGS: &[(usize, f64, f64)] = &[
5150
(10_000, 0.1, 1.0),
5251
];
5352

54-
static SESSION: LazyLock<VortexSession> =
55-
LazyLock::new(|| VortexSession::empty().with::<ArraySession>());
53+
static SESSION: LazyLock<VortexSession> = LazyLock::new(vortex_array::array_session);
5654

5755
#[divan::bench(types = [f32, f64], args = BENCH_ARGS)]
5856
fn compress_alp<T: ALPFloat + NativePType>(bencher: Bencher, args: (usize, f64, f64)) {

encodings/alp/src/alp/array.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,16 +485,14 @@ mod tests {
485485
use vortex_array::VortexSessionExecute;
486486
use vortex_array::arrays::PrimitiveArray;
487487
use vortex_array::assert_arrays_eq;
488-
use vortex_array::session::ArraySession;
489488
use vortex_error::VortexExpect;
490489
use vortex_session::VortexSession;
491490

492491
use super::*;
493492
use crate::alp_encode;
494493
use crate::decompress_into_array;
495494

496-
static SESSION: LazyLock<VortexSession> =
497-
LazyLock::new(|| VortexSession::empty().with::<ArraySession>());
495+
static SESSION: LazyLock<VortexSession> = LazyLock::new(vortex_array::array_session);
498496

499497
#[rstest]
500498
#[case(0)]

encodings/alp/src/alp/plugin.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ mod tests {
9898
use vortex_array::arrays::PrimitiveArray;
9999
use vortex_array::arrays::patched::PatchedArraySlotsExt;
100100
use vortex_array::buffer::BufferHandle;
101-
use vortex_array::session::ArraySession;
102101
use vortex_array::session::ArraySessionExt;
103102
use vortex_error::VortexResult;
104103
use vortex_error::vortex_err;
@@ -111,7 +110,7 @@ mod tests {
111110
use crate::alp_encode;
112111

113112
static SESSION: LazyLock<VortexSession> = LazyLock::new(|| {
114-
let session = VortexSession::empty().with::<ArraySession>();
113+
let session = vortex_array::array_session();
115114
session.arrays().register(ALPPatchedPlugin);
116115
session
117116
});

encodings/bytebool/src/array.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,8 @@ mod tests {
322322
use vortex_array::assert_arrays_eq;
323323
use vortex_array::serde::SerializeOptions;
324324
use vortex_array::serde::SerializedArray;
325-
use vortex_array::session::ArraySession;
326325
use vortex_array::session::ArraySessionExt;
327326
use vortex_buffer::ByteBufferMut;
328-
use vortex_session::VortexSession;
329327
use vortex_session::registry::ReadContext;
330328

331329
use super::*;
@@ -367,7 +365,7 @@ mod tests {
367365
let array = ByteBool::from_option_vec(vec![Some(true), None, Some(false), None]);
368366
let dtype = array.dtype().clone();
369367
let len = array.len();
370-
let session = VortexSession::empty().with::<ArraySession>();
368+
let session = vortex_array::array_session();
371369
session.arrays().register(ByteBool);
372370

373371
let ctx = ArrayContext::empty();

encodings/datetime-parts/src/canonical.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ mod test {
109109
use vortex_array::validity::Validity;
110110
use vortex_buffer::buffer;
111111
use vortex_error::VortexResult;
112-
use vortex_session::VortexSession;
113112

114113
use crate::DateTimeParts;
115114
use crate::array::DateTimePartsArraySlotsExt;
@@ -133,7 +132,7 @@ mod test {
133132
],
134133
validity.clone(),
135134
);
136-
let mut ctx = ExecutionCtx::new(VortexSession::empty());
135+
let mut ctx = ExecutionCtx::new(vortex_array::array_session());
137136
let date_times = DateTimeParts::try_from_temporal(
138137
TemporalArray::new_timestamp(
139138
milliseconds.clone().into_array(),

encodings/experimental/onpair/benches/decode.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ use vortex_array::builtins::ArrayBuiltins;
4141
use vortex_array::dtype::DType;
4242
use vortex_array::dtype::NativePType;
4343
use vortex_array::dtype::Nullability;
44-
use vortex_array::session::ArraySession;
4544
use vortex_buffer::Buffer;
4645
use vortex_buffer::ByteBuffer;
4746
use vortex_mask::Mask;
@@ -80,8 +79,7 @@ impl DecodeInputs {
8079
use vortex_onpair::onpair_compress;
8180
use vortex_session::VortexSession;
8281

83-
static SESSION: LazyLock<VortexSession> =
84-
LazyLock::new(|| VortexSession::empty().with::<ArraySession>());
82+
static SESSION: LazyLock<VortexSession> = LazyLock::new(vortex_array::array_session);
8583

8684
#[derive(Copy, Clone, Debug)]
8785
enum Shape {

encodings/experimental/onpair/src/tests.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use vortex_array::dtype::DType;
1515
use vortex_array::dtype::Nullability;
1616
use vortex_array::dtype::PType;
1717
use vortex_array::match_each_integer_ptype;
18-
use vortex_array::session::ArraySession;
1918
use vortex_array::test_harness::check_metadata;
2019
use vortex_array::validity::Validity;
2120
use vortex_buffer::BufferMut;
@@ -28,8 +27,7 @@ use crate::OnPairMetadata;
2827
use crate::compress::DEFAULT_DICT12_CONFIG;
2928
use crate::compress::onpair_compress;
3029

31-
static SESSION: LazyLock<VortexSession> =
32-
LazyLock::new(|| VortexSession::empty().with::<ArraySession>());
30+
static SESSION: LazyLock<VortexSession> = LazyLock::new(vortex_array::array_session);
3331

3432
fn sample_input() -> VarBinArray {
3533
VarBinArray::from_iter(

encodings/experimental/onpair/tests/big_data.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ use vortex_array::builtins::ArrayBuiltins;
2626
use vortex_array::dtype::DType;
2727
use vortex_array::dtype::Nullability;
2828
use vortex_array::scalar_fn::fns::operators::Operator;
29-
use vortex_array::session::ArraySession;
3029
use vortex_onpair::DEFAULT_DICT12_CONFIG;
3130
use vortex_onpair::onpair_compress;
3231
use vortex_session::VortexSession;
3332

34-
static SESSION: LazyLock<VortexSession> =
35-
LazyLock::new(|| VortexSession::empty().with::<ArraySession>());
33+
static SESSION: LazyLock<VortexSession> = LazyLock::new(vortex_array::array_session);
3634

3735
fn corpus(n: usize) -> Vec<String> {
3836
let templates: &[&str] = &[

encodings/fastlanes/benches/bitpack_compare.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use vortex_array::arrays::ConstantArray;
2323
use vortex_array::arrays::PrimitiveArray;
2424
use vortex_array::builtins::ArrayBuiltins;
2525
use vortex_array::scalar_fn::fns::operators::Operator;
26-
use vortex_array::session::ArraySession;
2726
use vortex_array::validity::Validity;
2827
use vortex_buffer::Alignment;
2928
use vortex_buffer::BufferMut;
@@ -36,8 +35,7 @@ fn main() {
3635
divan::main();
3736
}
3837

39-
static SESSION: LazyLock<VortexSession> =
40-
LazyLock::new(|| VortexSession::empty().with::<ArraySession>());
38+
static SESSION: LazyLock<VortexSession> = LazyLock::new(vortex_array::array_session);
4139

4240
const LENS: &[usize] = &[1024, 64 * 1024];
4341
const BIT_WIDTHS: &[u8] = &[4, 16];

0 commit comments

Comments
 (0)