diff --git a/encodings/alp/public-api.lock b/encodings/alp/public-api.lock index 7f769a0fc7a..55e908346d9 100644 --- a/encodings/alp/public-api.lock +++ b/encodings/alp/public-api.lock @@ -76,7 +76,7 @@ pub fn vortex_alp::ALP::execute(array: &Self::Array, ctx: &mut vortex_array::exe pub fn vortex_alp::ALP::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_alp::ALP::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_alp::ALP::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_alp::ALP::len(array: &vortex_alp::ALPArray) -> usize @@ -92,6 +92,8 @@ pub fn vortex_alp::ALP::serialize(metadata: Self::Metadata) -> vortex_error::Vor pub fn vortex_alp::ALP::stats(array: &vortex_alp::ALPArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_alp::ALP::vtable(_array: &Self::Array) -> &Self + pub fn vortex_alp::ALP::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_alp::ALP @@ -232,7 +234,7 @@ pub fn vortex_alp::ALPRD::execute(array: &Self::Array, ctx: &mut vortex_array::e pub fn vortex_alp::ALPRD::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_alp::ALPRD::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_alp::ALPRD::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_alp::ALPRD::len(array: &vortex_alp::ALPRDArray) -> usize @@ -248,6 +250,8 @@ pub fn vortex_alp::ALPRD::serialize(metadata: Self::Metadata) -> vortex_error::V pub fn vortex_alp::ALPRD::stats(array: &vortex_alp::ALPRDArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_alp::ALPRD::vtable(_array: &Self::Array) -> &Self + pub fn vortex_alp::ALPRD::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_alp::ALPRD diff --git a/encodings/alp/src/alp/array.rs b/encodings/alp/src/alp/array.rs index 965c1622ca8..5343ad15450 100644 --- a/encodings/alp/src/alp/array.rs +++ b/encodings/alp/src/alp/array.rs @@ -54,7 +54,11 @@ impl VTable for ALP { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &ALP + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/alp/src/alp_rd/array.rs b/encodings/alp/src/alp_rd/array.rs index df72cc189d3..cab37cad4a2 100644 --- a/encodings/alp/src/alp_rd/array.rs +++ b/encodings/alp/src/alp_rd/array.rs @@ -71,7 +71,11 @@ impl VTable for ALPRD { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &ALPRD + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/alp/src/lib.rs b/encodings/alp/src/lib.rs index 23ff46de4ee..9608fd8e2ab 100644 --- a/encodings/alp/src/lib.rs +++ b/encodings/alp/src/lib.rs @@ -29,8 +29,8 @@ mod alp_rd; /// Initialize ALP encoding in the given session. pub fn initialize(session: &mut VortexSession) { - session.arrays().register(ALP::ID, ALP); - session.arrays().register(ALPRD::ID, ALPRD); + session.arrays().register(ALP); + session.arrays().register(ALPRD); // Register the ALP-specific NaN count aggregate kernel. session.aggregate_fns().register_aggregate_kernel( diff --git a/encodings/bytebool/public-api.lock b/encodings/bytebool/public-api.lock index 192d025cf34..bb1e1a5e5ef 100644 --- a/encodings/bytebool/public-api.lock +++ b/encodings/bytebool/public-api.lock @@ -58,7 +58,7 @@ pub fn vortex_bytebool::ByteBool::execute(array: &Self::Array, _ctx: &mut vortex pub fn vortex_bytebool::ByteBool::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_bytebool::ByteBool::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_bytebool::ByteBool::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_bytebool::ByteBool::len(array: &vortex_bytebool::ByteBoolArray) -> usize @@ -74,6 +74,8 @@ pub fn vortex_bytebool::ByteBool::serialize(_metadata: Self::Metadata) -> vortex pub fn vortex_bytebool::ByteBool::stats(array: &vortex_bytebool::ByteBoolArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_bytebool::ByteBool::vtable(_array: &Self::Array) -> &Self + pub fn vortex_bytebool::ByteBool::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_bytebool::ByteBool diff --git a/encodings/bytebool/src/array.rs b/encodings/bytebool/src/array.rs index 4b6a0e7cb58..b7cf88b3763 100644 --- a/encodings/bytebool/src/array.rs +++ b/encodings/bytebool/src/array.rs @@ -48,7 +48,11 @@ impl VTable for ByteBool { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &ByteBool + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/datetime-parts/public-api.lock b/encodings/datetime-parts/public-api.lock index 475c7da5168..7c5f76f597c 100644 --- a/encodings/datetime-parts/public-api.lock +++ b/encodings/datetime-parts/public-api.lock @@ -66,7 +66,7 @@ pub fn vortex_datetime_parts::DateTimeParts::execute(array: &Self::Array, ctx: & pub fn vortex_datetime_parts::DateTimeParts::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_datetime_parts::DateTimeParts::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_datetime_parts::DateTimeParts::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_datetime_parts::DateTimeParts::len(array: &vortex_datetime_parts::DateTimePartsArray) -> usize @@ -82,6 +82,8 @@ pub fn vortex_datetime_parts::DateTimeParts::serialize(metadata: Self::Metadata) pub fn vortex_datetime_parts::DateTimeParts::stats(array: &vortex_datetime_parts::DateTimePartsArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_datetime_parts::DateTimeParts::vtable(_array: &Self::Array) -> &Self + pub fn vortex_datetime_parts::DateTimeParts::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_datetime_parts::DateTimeParts diff --git a/encodings/datetime-parts/src/array.rs b/encodings/datetime-parts/src/array.rs index b50ff8db0a5..1cc9f920cad 100644 --- a/encodings/datetime-parts/src/array.rs +++ b/encodings/datetime-parts/src/array.rs @@ -78,7 +78,11 @@ impl VTable for DateTimeParts { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &DateTimeParts + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/datetime-parts/src/lib.rs b/encodings/datetime-parts/src/lib.rs index 6394ad4e822..93032b0b97d 100644 --- a/encodings/datetime-parts/src/lib.rs +++ b/encodings/datetime-parts/src/lib.rs @@ -19,7 +19,7 @@ use vortex_session::VortexSession; /// Initialize datetime-parts encoding in the given session. pub fn initialize(session: &mut VortexSession) { - session.arrays().register(DateTimeParts::ID, DateTimeParts); + session.arrays().register(DateTimeParts); session.aggregate_fns().register_aggregate_kernel( DateTimeParts::ID, diff --git a/encodings/decimal-byte-parts/public-api.lock b/encodings/decimal-byte-parts/public-api.lock index cf9c86b6d1a..6ce143d358c 100644 --- a/encodings/decimal-byte-parts/public-api.lock +++ b/encodings/decimal-byte-parts/public-api.lock @@ -66,7 +66,7 @@ pub fn vortex_decimal_byte_parts::DecimalByteParts::execute(array: &Self::Array, pub fn vortex_decimal_byte_parts::DecimalByteParts::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_decimal_byte_parts::DecimalByteParts::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_decimal_byte_parts::DecimalByteParts::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_decimal_byte_parts::DecimalByteParts::len(array: &vortex_decimal_byte_parts::DecimalBytePartsArray) -> usize @@ -82,6 +82,8 @@ pub fn vortex_decimal_byte_parts::DecimalByteParts::serialize(metadata: Self::Me pub fn vortex_decimal_byte_parts::DecimalByteParts::stats(array: &vortex_decimal_byte_parts::DecimalBytePartsArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_decimal_byte_parts::DecimalByteParts::vtable(_array: &Self::Array) -> &Self + pub fn vortex_decimal_byte_parts::DecimalByteParts::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_decimal_byte_parts::DecimalByteParts diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs index cd56c256383..c3a35c4cf97 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs @@ -65,7 +65,11 @@ impl VTable for DecimalByteParts { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &DecimalByteParts + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/decimal-byte-parts/src/lib.rs b/encodings/decimal-byte-parts/src/lib.rs index 6a7035bbcb6..251003affa1 100644 --- a/encodings/decimal-byte-parts/src/lib.rs +++ b/encodings/decimal-byte-parts/src/lib.rs @@ -21,9 +21,7 @@ use vortex_session::VortexSession; /// Initialize decimal-byte-parts encoding in the given session. pub fn initialize(session: &mut VortexSession) { - session - .arrays() - .register(DecimalByteParts::ID, DecimalByteParts); + session.arrays().register(DecimalByteParts); session.aggregate_fns().register_aggregate_kernel( DecimalByteParts::ID, diff --git a/encodings/fastlanes/public-api.lock b/encodings/fastlanes/public-api.lock index 45bd7d15a42..59fc2d85f1b 100644 --- a/encodings/fastlanes/public-api.lock +++ b/encodings/fastlanes/public-api.lock @@ -180,7 +180,7 @@ pub fn vortex_fastlanes::BitPacked::execute(array: &Self::Array, ctx: &mut vorte pub fn vortex_fastlanes::BitPacked::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_fastlanes::BitPacked::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_fastlanes::BitPacked::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_fastlanes::BitPacked::len(array: &vortex_fastlanes::BitPackedArray) -> usize @@ -196,6 +196,8 @@ pub fn vortex_fastlanes::BitPacked::serialize(metadata: Self::Metadata) -> vorte pub fn vortex_fastlanes::BitPacked::stats(array: &vortex_fastlanes::BitPackedArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_fastlanes::BitPacked::vtable(_array: &Self::Array) -> &Self + pub fn vortex_fastlanes::BitPacked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_fastlanes::BitPacked @@ -326,7 +328,7 @@ pub fn vortex_fastlanes::Delta::dtype(array: &vortex_fastlanes::DeltaArray) -> & pub fn vortex_fastlanes::Delta::execute(array: &Self::Array, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult -pub fn vortex_fastlanes::Delta::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_fastlanes::Delta::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_fastlanes::Delta::len(array: &vortex_fastlanes::DeltaArray) -> usize @@ -342,6 +344,8 @@ pub fn vortex_fastlanes::Delta::serialize(metadata: Self::Metadata) -> vortex_er pub fn vortex_fastlanes::Delta::stats(array: &vortex_fastlanes::DeltaArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_fastlanes::Delta::vtable(_array: &Self::Array) -> &Self + pub fn vortex_fastlanes::Delta::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_fastlanes::Delta @@ -466,7 +470,7 @@ pub fn vortex_fastlanes::FoR::execute(array: &Self::Array, ctx: &mut vortex_arra pub fn vortex_fastlanes::FoR::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_fastlanes::FoR::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_fastlanes::FoR::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_fastlanes::FoR::len(array: &vortex_fastlanes::FoRArray) -> usize @@ -482,6 +486,8 @@ pub fn vortex_fastlanes::FoR::serialize(metadata: Self::Metadata) -> vortex_erro pub fn vortex_fastlanes::FoR::stats(array: &vortex_fastlanes::FoRArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_fastlanes::FoR::vtable(_array: &Self::Array) -> &Self + pub fn vortex_fastlanes::FoR::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_fastlanes::FoR @@ -588,7 +594,7 @@ pub fn vortex_fastlanes::RLE::execute(array: &Self::Array, ctx: &mut vortex_arra pub fn vortex_fastlanes::RLE::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_fastlanes::RLE::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_fastlanes::RLE::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_fastlanes::RLE::len(array: &vortex_fastlanes::RLEArray) -> usize @@ -604,6 +610,8 @@ pub fn vortex_fastlanes::RLE::serialize(metadata: Self::Metadata) -> vortex_erro pub fn vortex_fastlanes::RLE::stats(array: &vortex_fastlanes::RLEArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_fastlanes::RLE::vtable(_array: &Self::Array) -> &Self + pub fn vortex_fastlanes::RLE::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_fastlanes::RLE diff --git a/encodings/fastlanes/src/bitpacking/vtable/mod.rs b/encodings/fastlanes/src/bitpacking/vtable/mod.rs index c414dfa5cc0..25a3e11b959 100644 --- a/encodings/fastlanes/src/bitpacking/vtable/mod.rs +++ b/encodings/fastlanes/src/bitpacking/vtable/mod.rs @@ -70,7 +70,11 @@ impl VTable for BitPacked { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &BitPacked + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/fastlanes/src/delta/vtable/mod.rs b/encodings/fastlanes/src/delta/vtable/mod.rs index 790dedc6873..8f302aac4f9 100644 --- a/encodings/fastlanes/src/delta/vtable/mod.rs +++ b/encodings/fastlanes/src/delta/vtable/mod.rs @@ -55,7 +55,11 @@ impl VTable for Delta { type OperationsVTable = Self; type ValidityVTable = Self; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Delta + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/fastlanes/src/for/vtable/mod.rs b/encodings/fastlanes/src/for/vtable/mod.rs index 5eb73711ae4..9ebc0dee089 100644 --- a/encodings/fastlanes/src/for/vtable/mod.rs +++ b/encodings/fastlanes/src/for/vtable/mod.rs @@ -48,7 +48,11 @@ impl VTable for FoR { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &FoR + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/fastlanes/src/lib.rs b/encodings/fastlanes/src/lib.rs index d5ada9ec5e7..b22e9737365 100644 --- a/encodings/fastlanes/src/lib.rs +++ b/encodings/fastlanes/src/lib.rs @@ -28,10 +28,10 @@ use vortex_session::VortexSession; /// Initialize fastlanes encodings in the given session. pub fn initialize(session: &mut VortexSession) { - session.arrays().register(BitPacked::ID, BitPacked); - session.arrays().register(Delta::ID, Delta); - session.arrays().register(FoR::ID, FoR); - session.arrays().register(RLE::ID, RLE); + session.arrays().register(BitPacked); + session.arrays().register(Delta); + session.arrays().register(FoR); + session.arrays().register(RLE); // Register the encoding-specific aggregate kernels. session.aggregate_fns().register_aggregate_kernel( @@ -62,10 +62,10 @@ mod test { pub static SESSION: LazyLock = LazyLock::new(|| { let session = VortexSession::empty(); - session.arrays().register(BitPacked::ID, BitPacked); - session.arrays().register(Delta::ID, Delta); - session.arrays().register(FoR::ID, FoR); - session.arrays().register(RLE::ID, RLE); + session.arrays().register(BitPacked); + session.arrays().register(Delta); + session.arrays().register(FoR); + session.arrays().register(RLE); session }); } diff --git a/encodings/fastlanes/src/rle/vtable/mod.rs b/encodings/fastlanes/src/rle/vtable/mod.rs index 0df4126cbf5..5fb9cc0173e 100644 --- a/encodings/fastlanes/src/rle/vtable/mod.rs +++ b/encodings/fastlanes/src/rle/vtable/mod.rs @@ -62,7 +62,11 @@ impl VTable for RLE { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChildSliceHelper; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &RLE + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/fsst/public-api.lock b/encodings/fsst/public-api.lock index c7f958d609c..8df42025d72 100644 --- a/encodings/fsst/public-api.lock +++ b/encodings/fsst/public-api.lock @@ -68,7 +68,7 @@ pub fn vortex_fsst::FSST::execute(array: &Self::Array, ctx: &mut vortex_array::e pub fn vortex_fsst::FSST::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_fsst::FSST::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_fsst::FSST::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_fsst::FSST::len(array: &vortex_fsst::FSSTArray) -> usize @@ -84,6 +84,8 @@ pub fn vortex_fsst::FSST::serialize(metadata: Self::Metadata) -> vortex_error::V pub fn vortex_fsst::FSST::stats(array: &vortex_fsst::FSSTArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_fsst::FSST::vtable(_array: &Self::Array) -> &Self + pub fn vortex_fsst::FSST::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_fsst::FSST diff --git a/encodings/fsst/src/array.rs b/encodings/fsst/src/array.rs index 9228b34085c..f7452ae5a33 100644 --- a/encodings/fsst/src/array.rs +++ b/encodings/fsst/src/array.rs @@ -81,7 +81,11 @@ impl VTable for FSST { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &FSST + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/pco/public-api.lock b/encodings/pco/public-api.lock index b82093e811b..b67721840bf 100644 --- a/encodings/pco/public-api.lock +++ b/encodings/pco/public-api.lock @@ -48,7 +48,7 @@ pub fn vortex_pco::Pco::dtype(array: &vortex_pco::PcoArray) -> &vortex_array::dt pub fn vortex_pco::Pco::execute(array: &Self::Array, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult -pub fn vortex_pco::Pco::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_pco::Pco::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_pco::Pco::len(array: &vortex_pco::PcoArray) -> usize @@ -64,6 +64,8 @@ pub fn vortex_pco::Pco::serialize(metadata: Self::Metadata) -> vortex_error::Vor pub fn vortex_pco::Pco::stats(array: &vortex_pco::PcoArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_pco::Pco::vtable(_array: &Self::Array) -> &Self + pub fn vortex_pco::Pco::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_pco::Pco diff --git a/encodings/pco/src/array.rs b/encodings/pco/src/array.rs index 85ba2bbe6cb..36048990944 100644 --- a/encodings/pco/src/array.rs +++ b/encodings/pco/src/array.rs @@ -92,7 +92,11 @@ impl VTable for Pco { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValiditySliceHelper; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Pco + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/pco/src/test.rs b/encodings/pco/src/test.rs index 2cc7c830a5e..a73bbc7948f 100644 --- a/encodings/pco/src/test.rs +++ b/encodings/pco/src/test.rs @@ -32,7 +32,7 @@ use vortex_session::registry::ReadContext; static SESSION: LazyLock = LazyLock::new(|| { let session = VortexSession::empty().with::(); - session.arrays().register(Pco::ID, Pco); + session.arrays().register(Pco); session }); diff --git a/encodings/runend/public-api.lock b/encodings/runend/public-api.lock index a78046051d0..946a8dacdee 100644 --- a/encodings/runend/public-api.lock +++ b/encodings/runend/public-api.lock @@ -78,7 +78,7 @@ pub fn vortex_runend::RunEnd::execute(array: &Self::Array, ctx: &mut vortex_arra pub fn vortex_runend::RunEnd::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_runend::RunEnd::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_runend::RunEnd::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_runend::RunEnd::len(array: &vortex_runend::RunEndArray) -> usize @@ -94,6 +94,8 @@ pub fn vortex_runend::RunEnd::serialize(metadata: Self::Metadata) -> vortex_erro pub fn vortex_runend::RunEnd::stats(array: &vortex_runend::RunEndArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_runend::RunEnd::vtable(_array: &Self::Array) -> &Self + pub fn vortex_runend::RunEnd::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_runend::RunEnd diff --git a/encodings/runend/src/array.rs b/encodings/runend/src/array.rs index 6dd3fdc521d..ecb6a696f3c 100644 --- a/encodings/runend/src/array.rs +++ b/encodings/runend/src/array.rs @@ -65,7 +65,11 @@ impl VTable for RunEnd { type OperationsVTable = Self; type ValidityVTable = Self; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &RunEnd + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/runend/src/lib.rs b/encodings/runend/src/lib.rs index bbd8f218bea..13ca4f2e596 100644 --- a/encodings/runend/src/lib.rs +++ b/encodings/runend/src/lib.rs @@ -36,7 +36,7 @@ use vortex_session::VortexSession; /// Initialize run-end encoding in the given session. pub fn initialize(session: &mut VortexSession) { - session.arrays().register(RunEnd::ID, RunEnd); + session.arrays().register(RunEnd); // Register the RunEnd-specific aggregate kernels. session.aggregate_fns().register_aggregate_kernel( diff --git a/encodings/sequence/public-api.lock b/encodings/sequence/public-api.lock index 2696a1d1457..41e01a8aa18 100644 --- a/encodings/sequence/public-api.lock +++ b/encodings/sequence/public-api.lock @@ -66,7 +66,7 @@ pub fn vortex_sequence::Sequence::execute(array: &Self::Array, _ctx: &mut vortex pub fn vortex_sequence::Sequence::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_sequence::Sequence::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_sequence::Sequence::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_sequence::Sequence::len(array: &vortex_sequence::SequenceArray) -> usize @@ -82,6 +82,8 @@ pub fn vortex_sequence::Sequence::serialize(metadata: Self::Metadata) -> vortex_ pub fn vortex_sequence::Sequence::stats(array: &vortex_sequence::SequenceArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_sequence::Sequence::vtable(_array: &Self::Array) -> &Self + pub fn vortex_sequence::Sequence::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_sequence::Sequence diff --git a/encodings/sequence/src/array.rs b/encodings/sequence/src/array.rs index ea716ced1ea..7a4dd6078b8 100644 --- a/encodings/sequence/src/array.rs +++ b/encodings/sequence/src/array.rs @@ -242,7 +242,11 @@ impl VTable for Sequence { type OperationsVTable = Self; type ValidityVTable = Self; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Sequence + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/sequence/src/lib.rs b/encodings/sequence/src/lib.rs index 14aad87ca75..a6ff277b23d 100644 --- a/encodings/sequence/src/lib.rs +++ b/encodings/sequence/src/lib.rs @@ -24,7 +24,7 @@ use vortex_session::VortexSession; /// Initialize sequence encoding in the given session. pub fn initialize(session: &mut VortexSession) { - session.arrays().register(Sequence::ID, Sequence); + session.arrays().register(Sequence); // Register the Sequence-specific aggregate kernels. session.aggregate_fns().register_aggregate_kernel( diff --git a/encodings/sparse/public-api.lock b/encodings/sparse/public-api.lock index 9193dec8147..67c8d9bfb7b 100644 --- a/encodings/sparse/public-api.lock +++ b/encodings/sparse/public-api.lock @@ -82,7 +82,7 @@ pub fn vortex_sparse::Sparse::execute(array: &Self::Array, ctx: &mut vortex_arra pub fn vortex_sparse::Sparse::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_sparse::Sparse::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_sparse::Sparse::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_sparse::Sparse::len(array: &vortex_sparse::SparseArray) -> usize @@ -98,6 +98,8 @@ pub fn vortex_sparse::Sparse::serialize(metadata: Self::Metadata) -> vortex_erro pub fn vortex_sparse::Sparse::stats(array: &vortex_sparse::SparseArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_sparse::Sparse::vtable(_array: &Self::Array) -> &Self + pub fn vortex_sparse::Sparse::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_sparse::Sparse diff --git a/encodings/sparse/src/lib.rs b/encodings/sparse/src/lib.rs index 4b59797eca1..06138c0c814 100644 --- a/encodings/sparse/src/lib.rs +++ b/encodings/sparse/src/lib.rs @@ -80,7 +80,11 @@ impl VTable for Sparse { type OperationsVTable = Self; type ValidityVTable = Self; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Sparse + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/zigzag/public-api.lock b/encodings/zigzag/public-api.lock index 590e897cd8c..369864404d7 100644 --- a/encodings/zigzag/public-api.lock +++ b/encodings/zigzag/public-api.lock @@ -62,7 +62,7 @@ pub fn vortex_zigzag::ZigZag::execute(array: &Self::Array, ctx: &mut vortex_arra pub fn vortex_zigzag::ZigZag::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_zigzag::ZigZag::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_zigzag::ZigZag::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_zigzag::ZigZag::len(array: &vortex_zigzag::ZigZagArray) -> usize @@ -78,6 +78,8 @@ pub fn vortex_zigzag::ZigZag::serialize(_metadata: Self::Metadata) -> vortex_err pub fn vortex_zigzag::ZigZag::stats(array: &vortex_zigzag::ZigZagArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_zigzag::ZigZag::vtable(_array: &Self::Array) -> &Self + pub fn vortex_zigzag::ZigZag::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_zigzag::ZigZag diff --git a/encodings/zigzag/src/array.rs b/encodings/zigzag/src/array.rs index f0b7898b26c..7c916707169 100644 --- a/encodings/zigzag/src/array.rs +++ b/encodings/zigzag/src/array.rs @@ -48,7 +48,11 @@ impl VTable for ZigZag { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &ZigZag + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/zstd/public-api.lock b/encodings/zstd/public-api.lock index bfe24e26991..d3c6fdb812f 100644 --- a/encodings/zstd/public-api.lock +++ b/encodings/zstd/public-api.lock @@ -48,7 +48,7 @@ pub fn vortex_zstd::Zstd::dtype(array: &vortex_zstd::ZstdArray) -> &vortex_array pub fn vortex_zstd::Zstd::execute(array: &Self::Array, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult -pub fn vortex_zstd::Zstd::id(_array: &Self::Array) -> vortex_array::vtable::dyn_::ArrayId +pub fn vortex_zstd::Zstd::id(&self) -> vortex_array::vtable::dyn_::ArrayId pub fn vortex_zstd::Zstd::len(array: &vortex_zstd::ZstdArray) -> usize @@ -64,6 +64,8 @@ pub fn vortex_zstd::Zstd::serialize(metadata: Self::Metadata) -> vortex_error::V pub fn vortex_zstd::Zstd::stats(array: &vortex_zstd::ZstdArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_zstd::Zstd::vtable(_array: &Self::Array) -> &Self + pub fn vortex_zstd::Zstd::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_zstd::Zstd diff --git a/encodings/zstd/src/array.rs b/encodings/zstd/src/array.rs index 2acd9a56190..06c8dd2bf22 100644 --- a/encodings/zstd/src/array.rs +++ b/encodings/zstd/src/array.rs @@ -91,7 +91,11 @@ impl VTable for Zstd { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValiditySliceHelper; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Zstd + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/encodings/zstd/src/zstd_buffers.rs b/encodings/zstd/src/zstd_buffers.rs index c33403f2d64..9b3c398b553 100644 --- a/encodings/zstd/src/zstd_buffers.rs +++ b/encodings/zstd/src/zstd_buffers.rs @@ -330,7 +330,11 @@ impl VTable for ZstdBuffers { type OperationsVTable = Self; type ValidityVTable = Self; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &ZstdBuffers + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/public-api.lock b/vortex-array/public-api.lock index b72ced1ebf3..c53d9a893cf 100644 --- a/vortex-array/public-api.lock +++ b/vortex-array/public-api.lock @@ -920,7 +920,7 @@ pub fn vortex_array::arrays::Bool::execute(array: &Self::Array, _ctx: &mut vorte pub fn vortex_array::arrays::Bool::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Bool::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Bool::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Bool::len(array: &vortex_array::arrays::BoolArray) -> usize @@ -938,6 +938,8 @@ pub fn vortex_array::arrays::Bool::serialize(metadata: Self::Metadata) -> vortex pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Bool::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Bool::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::bool::BoolArray @@ -1128,7 +1130,7 @@ pub fn vortex_array::arrays::Chunked::execute(array: &Self::Array, ctx: &mut vor pub fn vortex_array::arrays::Chunked::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Chunked::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Chunked::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Chunked::len(array: &vortex_array::arrays::ChunkedArray) -> usize @@ -1146,6 +1148,8 @@ pub fn vortex_array::arrays::Chunked::serialize(_metadata: Self::Metadata) -> vo pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Chunked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Chunked @@ -1294,7 +1298,7 @@ pub fn vortex_array::arrays::Constant::execute(array: &Self::Array, _ctx: &mut v pub fn vortex_array::arrays::Constant::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Constant::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Constant::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Constant::len(array: &vortex_array::arrays::ConstantArray) -> usize @@ -1312,6 +1316,8 @@ pub fn vortex_array::arrays::Constant::serialize(_metadata: Self::Metadata) -> v pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Constant::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Constant::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Constant @@ -1500,7 +1506,7 @@ pub fn vortex_array::arrays::Decimal::execute(array: &Self::Array, _ctx: &mut vo pub fn vortex_array::arrays::Decimal::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Decimal::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Decimal::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Decimal::len(array: &vortex_array::arrays::DecimalArray) -> usize @@ -1518,6 +1524,8 @@ pub fn vortex_array::arrays::Decimal::serialize(metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Decimal::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::decimal::DecimalArray @@ -1708,7 +1716,7 @@ pub fn vortex_array::arrays::dict::Dict::execute(array: &Self::Array, ctx: &mut pub fn vortex_array::arrays::dict::Dict::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::dict::Dict::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::dict::Dict::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::dict::Dict::len(array: &vortex_array::arrays::dict::DictArray) -> usize @@ -1726,6 +1734,8 @@ pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::dict::Dict @@ -1812,7 +1822,7 @@ pub fn vortex_array::arrays::dict::Dict::execute(array: &Self::Array, ctx: &mut pub fn vortex_array::arrays::dict::Dict::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::dict::Dict::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::dict::Dict::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::dict::Dict::len(array: &vortex_array::arrays::dict::DictArray) -> usize @@ -1830,6 +1840,8 @@ pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::dict::Dict @@ -2108,7 +2120,7 @@ pub fn vortex_array::arrays::Extension::execute(array: &Self::Array, _ctx: &mut pub fn vortex_array::arrays::Extension::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Extension::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Extension::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Extension::len(array: &vortex_array::arrays::ExtensionArray) -> usize @@ -2126,6 +2138,8 @@ pub fn vortex_array::arrays::Extension::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Extension::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Extension::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityChild for vortex_array::arrays::Extension @@ -2244,7 +2258,7 @@ pub fn vortex_array::arrays::Filter::execute(array: &Self::Array, ctx: &mut vort pub fn vortex_array::arrays::Filter::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Filter::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Filter::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Filter::len(array: &vortex_array::arrays::FilterArray) -> usize @@ -2262,6 +2276,8 @@ pub fn vortex_array::arrays::Filter::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Filter::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Filter::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Filter @@ -2460,7 +2476,7 @@ pub fn vortex_array::arrays::FixedSizeList::execute(array: &Self::Array, _ctx: & pub fn vortex_array::arrays::FixedSizeList::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::FixedSizeList::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::FixedSizeList::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::FixedSizeList::len(array: &vortex_array::arrays::FixedSizeListArray) -> usize @@ -2478,6 +2494,8 @@ pub fn vortex_array::arrays::FixedSizeList::serialize(_metadata: Self::Metadata) pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::FixedSizeList::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::fixed_size_list::FixedSizeListArray @@ -2608,7 +2626,7 @@ pub fn vortex_array::arrays::List::execute(array: &Self::Array, ctx: &mut vortex pub fn vortex_array::arrays::List::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::List::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::List::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::List::len(array: &vortex_array::arrays::ListArray) -> usize @@ -2626,6 +2644,8 @@ pub fn vortex_array::arrays::List::serialize(metadata: Self::Metadata) -> vortex pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::List::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::List::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::list::ListArray @@ -2776,7 +2796,7 @@ pub fn vortex_array::arrays::ListView::execute(array: &Self::Array, _ctx: &mut v pub fn vortex_array::arrays::ListView::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::ListView::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::ListView::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::ListView::len(array: &vortex_array::arrays::ListViewArray) -> usize @@ -2794,6 +2814,8 @@ pub fn vortex_array::arrays::ListView::serialize(metadata: Self::Metadata) -> vo pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::ListView::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::ListView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::listview::ListViewArray @@ -2954,7 +2976,7 @@ pub fn vortex_array::arrays::Masked::execute(array: &Self::Array, ctx: &mut vort pub fn vortex_array::arrays::Masked::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Masked::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Masked::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Masked::len(array: &vortex_array::arrays::MaskedArray) -> usize @@ -2972,6 +2994,8 @@ pub fn vortex_array::arrays::Masked::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Masked::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Masked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::masked::MaskedArray @@ -3092,7 +3116,7 @@ pub fn vortex_array::arrays::null::Null::execute(array: &Self::Array, _ctx: &mut pub fn vortex_array::arrays::null::Null::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::null::Null::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::null::Null::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::null::Null::len(array: &vortex_array::arrays::null::NullArray) -> usize @@ -3110,6 +3134,8 @@ pub fn vortex_array::arrays::null::Null::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::null::Null::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::null::Null @@ -3302,7 +3328,7 @@ pub fn vortex_array::arrays::Primitive::execute(array: &Self::Array, _ctx: &mut pub fn vortex_array::arrays::Primitive::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Primitive::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Primitive::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Primitive::len(array: &vortex_array::arrays::PrimitiveArray) -> usize @@ -3320,6 +3346,8 @@ pub fn vortex_array::arrays::Primitive::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Primitive::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::primitive::PrimitiveArray @@ -3502,7 +3530,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::children(&self) -> &[vort pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::scalar_fn(&self) -> &vortex_array::scalar_fn::ScalarFnRef -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::try_new(bound: vortex_array::scalar_fn::ScalarFnRef, children: alloc::vec::Vec, len: usize) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::try_new(scalar_fn: vortex_array::scalar_fn::ScalarFnRef, children: alloc::vec::Vec, len: usize) -> vortex_error::VortexResult impl vortex_array::arrays::scalar_fn::ScalarFnArray @@ -3568,10 +3596,6 @@ impl core::fmt::Debug for vortex_array::arrays::scalar_fn::ScalarFnVTable pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::scalar_fn::ScalarFnVTable - -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> - impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::scalar_fn::ScalarFnVTable pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::scalar_at(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, index: usize) -> vortex_error::VortexResult @@ -3610,7 +3634,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::execute(array: &Self::Ar pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::id(array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::len(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> usize @@ -3628,6 +3652,8 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_metadata: Sel pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &Self::Array) -> &Self + pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::scalar_fn::ScalarFnVTable @@ -3692,7 +3718,7 @@ pub fn vortex_array::arrays::Shared::execute(array: &Self::Array, ctx: &mut vort pub fn vortex_array::arrays::Shared::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Shared::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Shared::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Shared::len(array: &vortex_array::arrays::SharedArray) -> usize @@ -3710,6 +3736,8 @@ pub fn vortex_array::arrays::Shared::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Shared::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Shared::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Shared @@ -3810,7 +3838,7 @@ pub fn vortex_array::arrays::slice::Slice::execute(array: &Self::Array, ctx: &mu pub fn vortex_array::arrays::slice::Slice::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::slice::Slice::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::slice::Slice::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::slice::Slice::len(array: &vortex_array::arrays::slice::SliceArray) -> usize @@ -3828,6 +3856,8 @@ pub fn vortex_array::arrays::slice::Slice::serialize(_metadata: Self::Metadata) pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::slice::SliceArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::slice::Slice::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::slice::Slice::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::slice::Slice @@ -3990,10 +4020,6 @@ impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::null::Nu pub fn vortex_array::arrays::null::Null::slice(_array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> -impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::scalar_fn::ScalarFnVTable - -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> - impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::slice::Slice pub fn vortex_array::arrays::slice::Slice::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> @@ -4068,7 +4094,7 @@ pub fn vortex_array::arrays::Struct::execute(array: &Self::Array, _ctx: &mut vor pub fn vortex_array::arrays::Struct::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Struct::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Struct::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Struct::len(array: &vortex_array::arrays::StructArray) -> usize @@ -4086,6 +4112,8 @@ pub fn vortex_array::arrays::Struct::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Struct::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Struct::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::struct_::StructArray @@ -4284,7 +4312,7 @@ pub fn vortex_array::arrays::VarBin::execute(array: &Self::Array, ctx: &mut vort pub fn vortex_array::arrays::VarBin::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBin::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::VarBin::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::VarBin::len(array: &vortex_array::arrays::VarBinArray) -> usize @@ -4302,6 +4330,8 @@ pub fn vortex_array::arrays::VarBin::serialize(metadata: Self::Metadata) -> vort pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::VarBin::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::VarBin::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::varbin::VarBinArray @@ -4686,7 +4716,7 @@ pub fn vortex_array::arrays::VarBinView::execute(array: &Self::Array, _ctx: &mut pub fn vortex_array::arrays::VarBinView::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBinView::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::VarBinView::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::VarBinView::len(array: &vortex_array::arrays::VarBinViewArray) -> usize @@ -4704,6 +4734,8 @@ pub fn vortex_array::arrays::VarBinView::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::VarBinView::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::VarBinView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::varbinview::VarBinViewArray @@ -4876,7 +4908,7 @@ pub fn vortex_array::arrays::Variant::execute(array: &Self::Array, _ctx: &mut vo pub fn vortex_array::arrays::Variant::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Variant::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Variant::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Variant::len(array: &Self::Array) -> usize @@ -4894,6 +4926,8 @@ pub fn vortex_array::arrays::Variant::serialize(_metadata: Self::Metadata) -> vo pub fn vortex_array::arrays::Variant::stats(array: &Self::Array) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Variant::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Variant::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Variant @@ -5016,7 +5050,7 @@ pub fn vortex_array::arrays::Bool::execute(array: &Self::Array, _ctx: &mut vorte pub fn vortex_array::arrays::Bool::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Bool::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Bool::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Bool::len(array: &vortex_array::arrays::BoolArray) -> usize @@ -5034,6 +5068,8 @@ pub fn vortex_array::arrays::Bool::serialize(metadata: Self::Metadata) -> vortex pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Bool::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Bool::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::BoolArray @@ -5196,7 +5232,7 @@ pub fn vortex_array::arrays::Chunked::execute(array: &Self::Array, ctx: &mut vor pub fn vortex_array::arrays::Chunked::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Chunked::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Chunked::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Chunked::len(array: &vortex_array::arrays::ChunkedArray) -> usize @@ -5214,6 +5250,8 @@ pub fn vortex_array::arrays::Chunked::serialize(_metadata: Self::Metadata) -> vo pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Chunked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Chunked @@ -5360,7 +5398,7 @@ pub fn vortex_array::arrays::Constant::execute(array: &Self::Array, _ctx: &mut v pub fn vortex_array::arrays::Constant::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Constant::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Constant::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Constant::len(array: &vortex_array::arrays::ConstantArray) -> usize @@ -5378,6 +5416,8 @@ pub fn vortex_array::arrays::Constant::serialize(_metadata: Self::Metadata) -> v pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Constant::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Constant::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Constant @@ -5502,7 +5542,7 @@ pub fn vortex_array::arrays::Decimal::execute(array: &Self::Array, _ctx: &mut vo pub fn vortex_array::arrays::Decimal::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Decimal::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Decimal::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Decimal::len(array: &vortex_array::arrays::DecimalArray) -> usize @@ -5520,6 +5560,8 @@ pub fn vortex_array::arrays::Decimal::serialize(metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Decimal::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::DecimalArray @@ -5678,7 +5720,7 @@ pub fn vortex_array::arrays::dict::Dict::execute(array: &Self::Array, ctx: &mut pub fn vortex_array::arrays::dict::Dict::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::dict::Dict::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::dict::Dict::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::dict::Dict::len(array: &vortex_array::arrays::dict::DictArray) -> usize @@ -5696,6 +5738,8 @@ pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::dict::Dict @@ -5832,7 +5876,7 @@ pub fn vortex_array::arrays::Extension::execute(array: &Self::Array, _ctx: &mut pub fn vortex_array::arrays::Extension::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Extension::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Extension::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Extension::len(array: &vortex_array::arrays::ExtensionArray) -> usize @@ -5850,6 +5894,8 @@ pub fn vortex_array::arrays::Extension::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Extension::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Extension::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityChild for vortex_array::arrays::Extension @@ -5966,7 +6012,7 @@ pub fn vortex_array::arrays::Filter::execute(array: &Self::Array, ctx: &mut vort pub fn vortex_array::arrays::Filter::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Filter::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Filter::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Filter::len(array: &vortex_array::arrays::FilterArray) -> usize @@ -5984,6 +6030,8 @@ pub fn vortex_array::arrays::Filter::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Filter::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Filter::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Filter @@ -6098,7 +6146,7 @@ pub fn vortex_array::arrays::FixedSizeList::execute(array: &Self::Array, _ctx: & pub fn vortex_array::arrays::FixedSizeList::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::FixedSizeList::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::FixedSizeList::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::FixedSizeList::len(array: &vortex_array::arrays::FixedSizeListArray) -> usize @@ -6116,6 +6164,8 @@ pub fn vortex_array::arrays::FixedSizeList::serialize(_metadata: Self::Metadata) pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::FixedSizeList::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::FixedSizeListArray @@ -6244,7 +6294,7 @@ pub fn vortex_array::arrays::List::execute(array: &Self::Array, ctx: &mut vortex pub fn vortex_array::arrays::List::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::List::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::List::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::List::len(array: &vortex_array::arrays::ListArray) -> usize @@ -6262,6 +6312,8 @@ pub fn vortex_array::arrays::List::serialize(metadata: Self::Metadata) -> vortex pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::List::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::List::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::ListArray @@ -6390,7 +6442,7 @@ pub fn vortex_array::arrays::ListView::execute(array: &Self::Array, _ctx: &mut v pub fn vortex_array::arrays::ListView::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::ListView::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::ListView::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::ListView::len(array: &vortex_array::arrays::ListViewArray) -> usize @@ -6408,6 +6460,8 @@ pub fn vortex_array::arrays::ListView::serialize(metadata: Self::Metadata) -> vo pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::ListView::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::ListView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::ListViewArray @@ -6548,7 +6602,7 @@ pub fn vortex_array::arrays::Masked::execute(array: &Self::Array, ctx: &mut vort pub fn vortex_array::arrays::Masked::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Masked::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Masked::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Masked::len(array: &vortex_array::arrays::MaskedArray) -> usize @@ -6566,6 +6620,8 @@ pub fn vortex_array::arrays::Masked::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Masked::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Masked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::MaskedArray @@ -6682,7 +6738,7 @@ pub fn vortex_array::arrays::null::Null::execute(array: &Self::Array, _ctx: &mut pub fn vortex_array::arrays::null::Null::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::null::Null::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::null::Null::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::null::Null::len(array: &vortex_array::arrays::null::NullArray) -> usize @@ -6700,6 +6756,8 @@ pub fn vortex_array::arrays::null::Null::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::null::Null::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::null::Null @@ -6824,7 +6882,7 @@ pub fn vortex_array::arrays::Primitive::execute(array: &Self::Array, _ctx: &mut pub fn vortex_array::arrays::Primitive::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Primitive::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Primitive::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Primitive::len(array: &vortex_array::arrays::PrimitiveArray) -> usize @@ -6842,6 +6900,8 @@ pub fn vortex_array::arrays::Primitive::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Primitive::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::PrimitiveArray @@ -6962,7 +7022,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::children(&self) -> &[vort pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::scalar_fn(&self) -> &vortex_array::scalar_fn::ScalarFnRef -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::try_new(bound: vortex_array::scalar_fn::ScalarFnRef, children: alloc::vec::Vec, len: usize) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::try_new(scalar_fn: vortex_array::scalar_fn::ScalarFnRef, children: alloc::vec::Vec, len: usize) -> vortex_error::VortexResult impl vortex_array::arrays::scalar_fn::ScalarFnArray @@ -7016,10 +7076,6 @@ impl core::fmt::Debug for vortex_array::arrays::scalar_fn::ScalarFnVTable pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::scalar_fn::ScalarFnVTable - -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> - impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::scalar_fn::ScalarFnVTable pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::scalar_at(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, index: usize) -> vortex_error::VortexResult @@ -7058,7 +7114,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::execute(array: &Self::Ar pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::id(array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::len(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> usize @@ -7076,6 +7132,8 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_metadata: Sel pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &Self::Array) -> &Self + pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::scalar_fn::ScalarFnVTable @@ -7130,7 +7188,7 @@ pub fn vortex_array::arrays::Shared::execute(array: &Self::Array, ctx: &mut vort pub fn vortex_array::arrays::Shared::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Shared::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Shared::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Shared::len(array: &vortex_array::arrays::SharedArray) -> usize @@ -7148,6 +7206,8 @@ pub fn vortex_array::arrays::Shared::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Shared::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Shared::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Shared @@ -7246,7 +7306,7 @@ pub fn vortex_array::arrays::slice::Slice::execute(array: &Self::Array, ctx: &mu pub fn vortex_array::arrays::slice::Slice::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::slice::Slice::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::slice::Slice::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::slice::Slice::len(array: &vortex_array::arrays::slice::SliceArray) -> usize @@ -7264,6 +7324,8 @@ pub fn vortex_array::arrays::slice::Slice::serialize(_metadata: Self::Metadata) pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::slice::SliceArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::slice::Slice::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::slice::Slice::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::slice::Slice @@ -7382,7 +7444,7 @@ pub fn vortex_array::arrays::Struct::execute(array: &Self::Array, _ctx: &mut vor pub fn vortex_array::arrays::Struct::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Struct::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Struct::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Struct::len(array: &vortex_array::arrays::StructArray) -> usize @@ -7400,6 +7462,8 @@ pub fn vortex_array::arrays::Struct::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Struct::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Struct::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::StructArray @@ -7622,7 +7686,7 @@ pub fn vortex_array::arrays::VarBin::execute(array: &Self::Array, ctx: &mut vort pub fn vortex_array::arrays::VarBin::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBin::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::VarBin::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::VarBin::len(array: &vortex_array::arrays::VarBinArray) -> usize @@ -7640,6 +7704,8 @@ pub fn vortex_array::arrays::VarBin::serialize(metadata: Self::Metadata) -> vort pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::VarBin::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::VarBin::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::VarBinArray @@ -7838,7 +7904,7 @@ pub fn vortex_array::arrays::VarBinView::execute(array: &Self::Array, _ctx: &mut pub fn vortex_array::arrays::VarBinView::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBinView::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::VarBinView::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::VarBinView::len(array: &vortex_array::arrays::VarBinViewArray) -> usize @@ -7856,6 +7922,8 @@ pub fn vortex_array::arrays::VarBinView::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::VarBinView::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::VarBinView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::VarBinViewArray @@ -8016,7 +8084,7 @@ pub fn vortex_array::arrays::Variant::execute(array: &Self::Array, _ctx: &mut vo pub fn vortex_array::arrays::Variant::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Variant::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Variant::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Variant::len(array: &Self::Array) -> usize @@ -8034,6 +8102,8 @@ pub fn vortex_array::arrays::Variant::serialize(_metadata: Self::Metadata) -> vo pub fn vortex_array::arrays::Variant::stats(array: &Self::Array) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Variant::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Variant::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Variant @@ -19868,7 +19938,9 @@ pub struct vortex_array::session::ArraySession impl vortex_array::session::ArraySession -pub fn vortex_array::session::ArraySession::register(&self, id: impl core::convert::Into, encoding: impl core::convert::Into<&'static dyn vortex_array::vtable::DynVTable>) +pub fn vortex_array::session::ArraySession::empty() -> vortex_array::session::ArraySession + +pub fn vortex_array::session::ArraySession::register(&self, vtable: V) pub fn vortex_array::session::ArraySession::registry(&self) -> &vortex_array::session::ArrayRegistry @@ -19888,7 +19960,7 @@ impl vortex_array::session::ArraySessionExt for S pub fn S::arrays(&self) -> vortex_session::Ref<'_, vortex_array::session::ArraySession> -pub type vortex_array::session::ArrayRegistry = vortex_session::registry::Registry<&'static dyn vortex_array::vtable::DynVTable> +pub type vortex_array::session::ArrayRegistry = vortex_session::registry::Registry pub mod vortex_array::stats @@ -20380,15 +20452,7 @@ impl vortex_array::vtable::ValidityVTable fo pub fn vortex_array::vtable::ValidityVTableFromValiditySliceHelper::validity(array: &::Array) -> vortex_error::VortexResult -pub trait vortex_array::vtable::ArrayVTableExt - -pub fn vortex_array::vtable::ArrayVTableExt::vtable() -> &'static dyn vortex_array::vtable::DynVTable - -impl vortex_array::vtable::ArrayVTableExt for V - -pub fn V::vtable() -> &'static dyn vortex_array::vtable::DynVTable - -pub trait vortex_array::vtable::DynVTable: 'static + vortex_array::vtable::dyn_::private::Sealed + core::marker::Send + core::marker::Sync + core::fmt::Debug +pub trait vortex_array::vtable::DynVTable: 'static + core::marker::Send + core::marker::Sync + core::fmt::Debug pub fn vortex_array::vtable::DynVTable::build(&self, id: vortex_array::vtable::ArrayId, dtype: &vortex_array::dtype::DType, len: usize, metadata: &[u8], buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren, session: &vortex_session::VortexSession) -> vortex_error::VortexResult @@ -20402,6 +20466,20 @@ pub fn vortex_array::vtable::DynVTable::reduce_parent(&self, array: &vortex_arra pub fn vortex_array::vtable::DynVTable::with_children(&self, array: &vortex_array::ArrayRef, children: alloc::vec::Vec) -> vortex_error::VortexResult +impl vortex_array::vtable::DynVTable for V + +pub fn V::build(&self, _id: vortex_array::vtable::ArrayId, dtype: &vortex_array::dtype::DType, len: usize, metadata: &[u8], buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren, session: &vortex_session::VortexSession) -> vortex_error::VortexResult + +pub fn V::execute(&self, array: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + +pub fn V::execute_parent(&self, array: &vortex_array::ArrayRef, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> + +pub fn V::reduce(&self, array: &vortex_array::ArrayRef) -> vortex_error::VortexResult> + +pub fn V::reduce_parent(&self, array: &vortex_array::ArrayRef, parent: &vortex_array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> + +pub fn V::with_children(&self, array: &vortex_array::ArrayRef, children: alloc::vec::Vec) -> vortex_error::VortexResult + pub trait vortex_array::vtable::OperationsVTable pub fn vortex_array::vtable::OperationsVTable::scalar_at(array: &::Array, index: usize) -> vortex_error::VortexResult @@ -20524,7 +20602,7 @@ pub fn vortex_array::vtable::VTable::execute(array: &Self::Array, ctx: &mut vort pub fn vortex_array::vtable::VTable::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::vtable::VTable::id(array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::vtable::VTable::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::vtable::VTable::len(array: &Self::Array) -> usize @@ -20542,6 +20620,8 @@ pub fn vortex_array::vtable::VTable::serialize(metadata: Self::Metadata) -> vort pub fn vortex_array::vtable::VTable::stats(array: &Self::Array) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::vtable::VTable::vtable(array: &Self::Array) -> &Self + pub fn vortex_array::vtable::VTable::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Bool @@ -20578,7 +20658,7 @@ pub fn vortex_array::arrays::Bool::execute(array: &Self::Array, _ctx: &mut vorte pub fn vortex_array::arrays::Bool::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Bool::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Bool::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Bool::len(array: &vortex_array::arrays::BoolArray) -> usize @@ -20596,6 +20676,8 @@ pub fn vortex_array::arrays::Bool::serialize(metadata: Self::Metadata) -> vortex pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Bool::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Bool::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Chunked @@ -20632,7 +20714,7 @@ pub fn vortex_array::arrays::Chunked::execute(array: &Self::Array, ctx: &mut vor pub fn vortex_array::arrays::Chunked::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Chunked::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Chunked::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Chunked::len(array: &vortex_array::arrays::ChunkedArray) -> usize @@ -20650,6 +20732,8 @@ pub fn vortex_array::arrays::Chunked::serialize(_metadata: Self::Metadata) -> vo pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Chunked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Constant @@ -20686,7 +20770,7 @@ pub fn vortex_array::arrays::Constant::execute(array: &Self::Array, _ctx: &mut v pub fn vortex_array::arrays::Constant::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Constant::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Constant::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Constant::len(array: &vortex_array::arrays::ConstantArray) -> usize @@ -20704,6 +20788,8 @@ pub fn vortex_array::arrays::Constant::serialize(_metadata: Self::Metadata) -> v pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Constant::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Constant::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Decimal @@ -20740,7 +20826,7 @@ pub fn vortex_array::arrays::Decimal::execute(array: &Self::Array, _ctx: &mut vo pub fn vortex_array::arrays::Decimal::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Decimal::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Decimal::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Decimal::len(array: &vortex_array::arrays::DecimalArray) -> usize @@ -20758,6 +20844,8 @@ pub fn vortex_array::arrays::Decimal::serialize(metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Decimal::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Extension @@ -20794,7 +20882,7 @@ pub fn vortex_array::arrays::Extension::execute(array: &Self::Array, _ctx: &mut pub fn vortex_array::arrays::Extension::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Extension::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Extension::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Extension::len(array: &vortex_array::arrays::ExtensionArray) -> usize @@ -20812,6 +20900,8 @@ pub fn vortex_array::arrays::Extension::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Extension::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Extension::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Filter @@ -20848,7 +20938,7 @@ pub fn vortex_array::arrays::Filter::execute(array: &Self::Array, ctx: &mut vort pub fn vortex_array::arrays::Filter::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Filter::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Filter::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Filter::len(array: &vortex_array::arrays::FilterArray) -> usize @@ -20866,6 +20956,8 @@ pub fn vortex_array::arrays::Filter::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Filter::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Filter::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::FixedSizeList @@ -20902,7 +20994,7 @@ pub fn vortex_array::arrays::FixedSizeList::execute(array: &Self::Array, _ctx: & pub fn vortex_array::arrays::FixedSizeList::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::FixedSizeList::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::FixedSizeList::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::FixedSizeList::len(array: &vortex_array::arrays::FixedSizeListArray) -> usize @@ -20920,6 +21012,8 @@ pub fn vortex_array::arrays::FixedSizeList::serialize(_metadata: Self::Metadata) pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::FixedSizeList::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::List @@ -20956,7 +21050,7 @@ pub fn vortex_array::arrays::List::execute(array: &Self::Array, ctx: &mut vortex pub fn vortex_array::arrays::List::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::List::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::List::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::List::len(array: &vortex_array::arrays::ListArray) -> usize @@ -20974,6 +21068,8 @@ pub fn vortex_array::arrays::List::serialize(metadata: Self::Metadata) -> vortex pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::List::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::List::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::ListView @@ -21010,7 +21106,7 @@ pub fn vortex_array::arrays::ListView::execute(array: &Self::Array, _ctx: &mut v pub fn vortex_array::arrays::ListView::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::ListView::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::ListView::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::ListView::len(array: &vortex_array::arrays::ListViewArray) -> usize @@ -21028,6 +21124,8 @@ pub fn vortex_array::arrays::ListView::serialize(metadata: Self::Metadata) -> vo pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::ListView::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::ListView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Masked @@ -21064,7 +21162,7 @@ pub fn vortex_array::arrays::Masked::execute(array: &Self::Array, ctx: &mut vort pub fn vortex_array::arrays::Masked::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Masked::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Masked::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Masked::len(array: &vortex_array::arrays::MaskedArray) -> usize @@ -21082,6 +21180,8 @@ pub fn vortex_array::arrays::Masked::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Masked::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Masked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Primitive @@ -21118,7 +21218,7 @@ pub fn vortex_array::arrays::Primitive::execute(array: &Self::Array, _ctx: &mut pub fn vortex_array::arrays::Primitive::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Primitive::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Primitive::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Primitive::len(array: &vortex_array::arrays::PrimitiveArray) -> usize @@ -21136,6 +21236,8 @@ pub fn vortex_array::arrays::Primitive::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Primitive::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Shared @@ -21172,7 +21274,7 @@ pub fn vortex_array::arrays::Shared::execute(array: &Self::Array, ctx: &mut vort pub fn vortex_array::arrays::Shared::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Shared::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Shared::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Shared::len(array: &vortex_array::arrays::SharedArray) -> usize @@ -21190,6 +21292,8 @@ pub fn vortex_array::arrays::Shared::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Shared::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Shared::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Struct @@ -21226,7 +21330,7 @@ pub fn vortex_array::arrays::Struct::execute(array: &Self::Array, _ctx: &mut vor pub fn vortex_array::arrays::Struct::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Struct::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Struct::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Struct::len(array: &vortex_array::arrays::StructArray) -> usize @@ -21244,6 +21348,8 @@ pub fn vortex_array::arrays::Struct::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Struct::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Struct::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::VarBin @@ -21280,7 +21386,7 @@ pub fn vortex_array::arrays::VarBin::execute(array: &Self::Array, ctx: &mut vort pub fn vortex_array::arrays::VarBin::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBin::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::VarBin::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::VarBin::len(array: &vortex_array::arrays::VarBinArray) -> usize @@ -21298,6 +21404,8 @@ pub fn vortex_array::arrays::VarBin::serialize(metadata: Self::Metadata) -> vort pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::VarBin::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::VarBin::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::VarBinView @@ -21334,7 +21442,7 @@ pub fn vortex_array::arrays::VarBinView::execute(array: &Self::Array, _ctx: &mut pub fn vortex_array::arrays::VarBinView::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBinView::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::VarBinView::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::VarBinView::len(array: &vortex_array::arrays::VarBinViewArray) -> usize @@ -21352,6 +21460,8 @@ pub fn vortex_array::arrays::VarBinView::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::VarBinView::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::VarBinView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Variant @@ -21388,7 +21498,7 @@ pub fn vortex_array::arrays::Variant::execute(array: &Self::Array, _ctx: &mut vo pub fn vortex_array::arrays::Variant::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Variant::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::Variant::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Variant::len(array: &Self::Array) -> usize @@ -21406,6 +21516,8 @@ pub fn vortex_array::arrays::Variant::serialize(_metadata: Self::Metadata) -> vo pub fn vortex_array::arrays::Variant::stats(array: &Self::Array) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Variant::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::Variant::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::dict::Dict @@ -21442,7 +21554,7 @@ pub fn vortex_array::arrays::dict::Dict::execute(array: &Self::Array, ctx: &mut pub fn vortex_array::arrays::dict::Dict::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::dict::Dict::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::dict::Dict::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::dict::Dict::len(array: &vortex_array::arrays::dict::DictArray) -> usize @@ -21460,6 +21572,8 @@ pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::null::Null @@ -21496,7 +21610,7 @@ pub fn vortex_array::arrays::null::Null::execute(array: &Self::Array, _ctx: &mut pub fn vortex_array::arrays::null::Null::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::null::Null::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::null::Null::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::null::Null::len(array: &vortex_array::arrays::null::NullArray) -> usize @@ -21514,6 +21628,8 @@ pub fn vortex_array::arrays::null::Null::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::null::Null::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::scalar_fn::ScalarFnVTable @@ -21550,7 +21666,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::execute(array: &Self::Ar pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::id(array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::len(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> usize @@ -21568,6 +21684,8 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_metadata: Sel pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &Self::Array) -> &Self + pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::slice::Slice @@ -21604,7 +21722,7 @@ pub fn vortex_array::arrays::slice::Slice::execute(array: &Self::Array, ctx: &mu pub fn vortex_array::arrays::slice::Slice::execute_parent(array: &Self::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::slice::Slice::id(_array: &Self::Array) -> vortex_array::vtable::ArrayId +pub fn vortex_array::arrays::slice::Slice::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::slice::Slice::len(array: &vortex_array::arrays::slice::SliceArray) -> usize @@ -21622,6 +21740,8 @@ pub fn vortex_array::arrays::slice::Slice::serialize(_metadata: Self::Metadata) pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::slice::SliceArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::slice::Slice::vtable(_array: &Self::Array) -> &Self + pub fn vortex_array::arrays::slice::Slice::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub trait vortex_array::vtable::ValidityChild @@ -21756,6 +21876,8 @@ pub fn vortex_array::vtable::validity_to_child(validity: &vortex_array::validity pub type vortex_array::vtable::ArrayId = arcref::ArcRef +pub type vortex_array::vtable::DynVTableRef = alloc::sync::Arc + pub macro vortex_array::field_path! pub macro vortex_array::match_each_decimal_value! @@ -22876,7 +22998,7 @@ impl vortex_array::VortexSessionExecute for vortex_session::VortexSession pub fn vortex_session::VortexSession::create_execution_ctx(&self) -> vortex_array::ExecutionCtx -pub type vortex_array::ArrayContext = vortex_session::registry::Context<&'static dyn vortex_array::vtable::DynVTable> +pub type vortex_array::ArrayContext = vortex_session::registry::Context pub type vortex_array::ArrayRef = alloc::sync::Arc diff --git a/vortex-array/src/array/mod.rs b/vortex-array/src/array/mod.rs index 79eb980d317..5436ec2250b 100644 --- a/vortex-array/src/array/mod.rs +++ b/vortex-array/src/array/mod.rs @@ -59,7 +59,6 @@ use crate::scalar_fn::ScalarFnRef; use crate::stats::StatsSetRef; use crate::validity::Validity; use crate::vtable::ArrayId; -use crate::vtable::ArrayVTableExt; use crate::vtable::DynVTable; use crate::vtable::OperationsVTable; use crate::vtable::VTable; @@ -455,11 +454,11 @@ impl DynArray for ArrayAdapter { } fn vtable(&self) -> &dyn DynVTable { - V::vtable() + V::vtable(&self.0) } fn encoding_id(&self) -> ArrayId { - V::id(&self.0) + V::vtable(&self.0).id() } fn slice(&self, range: Range) -> VortexResult { diff --git a/vortex-array/src/arrays/bool/vtable/mod.rs b/vortex-array/src/arrays/bool/vtable/mod.rs index d439ecf0e78..2519c1895e7 100644 --- a/vortex-array/src/arrays/bool/vtable/mod.rs +++ b/vortex-array/src/arrays/bool/vtable/mod.rs @@ -56,7 +56,11 @@ impl VTable for Bool { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Bool + } + + fn id(&self) -> ArrayId { Self::ID } @@ -189,21 +193,21 @@ impl VTable for Bool { Ok(ExecutionStep::Done(array.clone().into_array())) } - fn reduce_parent( + fn execute_parent( array: &Self::Array, parent: &ArrayRef, child_idx: usize, + ctx: &mut ExecutionCtx, ) -> VortexResult> { - RULES.evaluate(array, parent, child_idx) + PARENT_KERNELS.execute(array, parent, child_idx, ctx) } - fn execute_parent( + fn reduce_parent( array: &Self::Array, parent: &ArrayRef, child_idx: usize, - ctx: &mut ExecutionCtx, ) -> VortexResult> { - PARENT_KERNELS.execute(array, parent, child_idx, ctx) + RULES.evaluate(array, parent, child_idx) } } diff --git a/vortex-array/src/arrays/chunked/vtable/mod.rs b/vortex-array/src/arrays/chunked/vtable/mod.rs index 49dd7f9f6d7..bb04800cdd5 100644 --- a/vortex-array/src/arrays/chunked/vtable/mod.rs +++ b/vortex-array/src/arrays/chunked/vtable/mod.rs @@ -55,7 +55,11 @@ impl VTable for Chunked { type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Chunked + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/constant/vtable/mod.rs b/vortex-array/src/arrays/constant/vtable/mod.rs index d35b874193b..9f6fb377fad 100644 --- a/vortex-array/src/arrays/constant/vtable/mod.rs +++ b/vortex-array/src/arrays/constant/vtable/mod.rs @@ -58,7 +58,11 @@ impl VTable for Constant { type OperationsVTable = Self; type ValidityVTable = Self; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Constant + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/decimal/vtable/mod.rs b/vortex-array/src/arrays/decimal/vtable/mod.rs index 37b62240121..49efe6e97c1 100644 --- a/vortex-array/src/arrays/decimal/vtable/mod.rs +++ b/vortex-array/src/arrays/decimal/vtable/mod.rs @@ -58,7 +58,11 @@ impl VTable for Decimal { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Decimal + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/dict/vtable/mod.rs b/vortex-array/src/arrays/dict/vtable/mod.rs index 2903967c230..91c3c45ede4 100644 --- a/vortex-array/src/arrays/dict/vtable/mod.rs +++ b/vortex-array/src/arrays/dict/vtable/mod.rs @@ -58,7 +58,11 @@ impl VTable for Dict { type OperationsVTable = Self; type ValidityVTable = Self; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Dict + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/extension/vtable/mod.rs b/vortex-array/src/arrays/extension/vtable/mod.rs index 243a0ef35d8..cd630ce11b9 100644 --- a/vortex-array/src/arrays/extension/vtable/mod.rs +++ b/vortex-array/src/arrays/extension/vtable/mod.rs @@ -43,7 +43,11 @@ impl VTable for Extension { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Extension + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/filter/vtable.rs b/vortex-array/src/arrays/filter/vtable.rs index b7099cb7c97..4287b788863 100644 --- a/vortex-array/src/arrays/filter/vtable.rs +++ b/vortex-array/src/arrays/filter/vtable.rs @@ -52,7 +52,11 @@ impl VTable for Filter { type Metadata = FilterMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Filter + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/fixed_size_list/vtable/mod.rs b/vortex-array/src/arrays/fixed_size_list/vtable/mod.rs index d5c6f673671..3b6438773d4 100644 --- a/vortex-array/src/arrays/fixed_size_list/vtable/mod.rs +++ b/vortex-array/src/arrays/fixed_size_list/vtable/mod.rs @@ -49,7 +49,11 @@ impl VTable for FixedSizeList { type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &FixedSizeList + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/list/vtable/mod.rs b/vortex-array/src/arrays/list/vtable/mod.rs index 13428f3a46b..0a7325d9998 100644 --- a/vortex-array/src/arrays/list/vtable/mod.rs +++ b/vortex-array/src/arrays/list/vtable/mod.rs @@ -56,7 +56,11 @@ impl VTable for List { type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &List + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/listview/vtable/mod.rs b/vortex-array/src/arrays/listview/vtable/mod.rs index a31edbb536f..21398950931 100644 --- a/vortex-array/src/arrays/listview/vtable/mod.rs +++ b/vortex-array/src/arrays/listview/vtable/mod.rs @@ -62,7 +62,11 @@ impl VTable for ListView { type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &ListView + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/masked/vtable/mod.rs b/vortex-array/src/arrays/masked/vtable/mod.rs index 4dbe1670a43..e1d1b7e23b5 100644 --- a/vortex-array/src/arrays/masked/vtable/mod.rs +++ b/vortex-array/src/arrays/masked/vtable/mod.rs @@ -54,7 +54,11 @@ impl VTable for Masked { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Masked + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/null/mod.rs b/vortex-array/src/arrays/null/mod.rs index e2ac02f247c..673f153f031 100644 --- a/vortex-array/src/arrays/null/mod.rs +++ b/vortex-array/src/arrays/null/mod.rs @@ -39,7 +39,11 @@ impl VTable for Null { type OperationsVTable = Self; type ValidityVTable = Self; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Null + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/primitive/vtable/mod.rs b/vortex-array/src/arrays/primitive/vtable/mod.rs index c48a72217b1..6343f48e014 100644 --- a/vortex-array/src/arrays/primitive/vtable/mod.rs +++ b/vortex-array/src/arrays/primitive/vtable/mod.rs @@ -50,7 +50,11 @@ impl VTable for Primitive { type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Primitive + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/scalar_fn/array.rs b/vortex-array/src/arrays/scalar_fn/array.rs index 1e3ef1d14ba..d027a74d6ec 100644 --- a/vortex-array/src/arrays/scalar_fn/array.rs +++ b/vortex-array/src/arrays/scalar_fn/array.rs @@ -6,13 +6,14 @@ use vortex_error::vortex_ensure; use crate::ArrayRef; use crate::DynArray; +use crate::arrays::ScalarFnVTable; use crate::dtype::DType; use crate::scalar_fn::ScalarFnRef; use crate::stats::ArrayStats; #[derive(Clone, Debug)] pub struct ScalarFnArray { - pub(super) scalar_fn: ScalarFnRef, + pub(super) vtable: ScalarFnVTable, pub(super) dtype: DType, pub(super) len: usize, pub(super) children: Vec, @@ -21,9 +22,13 @@ pub struct ScalarFnArray { impl ScalarFnArray { /// Create a new ScalarFnArray from a scalar function and its children. - pub fn try_new(bound: ScalarFnRef, children: Vec, len: usize) -> VortexResult { + pub fn try_new( + scalar_fn: ScalarFnRef, + children: Vec, + len: usize, + ) -> VortexResult { let arg_dtypes: Vec<_> = children.iter().map(|c| c.dtype().clone()).collect(); - let dtype = bound.return_dtype(&arg_dtypes)?; + let dtype = scalar_fn.return_dtype(&arg_dtypes)?; vortex_ensure!( children.iter().all(|c| c.len() == len), @@ -31,7 +36,7 @@ impl ScalarFnArray { ); Ok(Self { - scalar_fn: bound, + vtable: ScalarFnVTable { scalar_fn }, dtype, len, children, @@ -41,8 +46,9 @@ impl ScalarFnArray { /// Get the scalar function bound to this array. #[allow(clippy::same_name_method)] + #[inline(always)] pub fn scalar_fn(&self) -> &ScalarFnRef { - &self.scalar_fn + &self.vtable.scalar_fn } /// Get the children arrays of this scalar function array. diff --git a/vortex-array/src/arrays/scalar_fn/mod.rs b/vortex-array/src/arrays/scalar_fn/mod.rs index 781170596fa..4e8e31222c7 100644 --- a/vortex-array/src/arrays/scalar_fn/mod.rs +++ b/vortex-array/src/arrays/scalar_fn/mod.rs @@ -4,7 +4,6 @@ mod array; mod metadata; mod rules; -mod slice; mod vtable; pub use array::*; diff --git a/vortex-array/src/arrays/scalar_fn/rules.rs b/vortex-array/src/arrays/scalar_fn/rules.rs index 00318c4fbd7..d0b9dd74183 100644 --- a/vortex-array/src/arrays/scalar_fn/rules.rs +++ b/vortex-array/src/arrays/scalar_fn/rules.rs @@ -18,8 +18,9 @@ use crate::arrays::Filter; use crate::arrays::FilterArray; use crate::arrays::ScalarFnArray; use crate::arrays::ScalarFnVTable; +use crate::arrays::Slice; +use crate::arrays::SliceArray; use crate::arrays::StructArray; -use crate::arrays::slice::SliceReduceAdaptor; use crate::dtype::DType; use crate::optimizer::rules::ArrayParentReduceRule; use crate::optimizer::rules::ArrayReduceRule; @@ -40,7 +41,7 @@ pub(super) const RULES: ReduceRuleSet = ReduceRuleSet::new(&[ pub(super) const PARENT_RULES: ParentRuleSet = ParentRuleSet::new(&[ ParentRuleSet::lift(&ScalarFnUnaryFilterPushDownRule), - ParentRuleSet::lift(&SliceReduceAdaptor(ScalarFnVTable)), + ParentRuleSet::lift(&ScalarFnSliceReduceRule), ]); /// Converts a ScalarFnArray with Pack into a StructArray directly. @@ -48,7 +49,7 @@ pub(super) const PARENT_RULES: ParentRuleSet = ParentRuleSet::ne struct ScalarFnPackToStructRule; impl ArrayReduceRule for ScalarFnPackToStructRule { fn reduce(&self, array: &ScalarFnArray) -> VortexResult> { - let Some(pack_options) = array.scalar_fn.as_opt::() else { + let Some(pack_options) = array.scalar_fn().as_opt::() else { return Ok(None); }; @@ -85,12 +86,44 @@ impl ArrayReduceRule for ScalarFnConstantRule { } } +#[derive(Debug)] +struct ScalarFnSliceReduceRule; +impl ArrayParentReduceRule for ScalarFnSliceReduceRule { + type Parent = Slice; + + fn reduce_parent( + &self, + array: &ScalarFnArray, + parent: &SliceArray, + _child_idx: usize, + ) -> VortexResult> { + let range = parent.slice_range(); + + let children: Vec<_> = array + .children() + .iter() + .map(|c| c.slice(range.clone())) + .collect::>()?; + + Ok(Some( + ScalarFnArray { + vtable: array.vtable.clone(), + dtype: array.dtype.clone(), + len: range.len(), + children, + stats: Default::default(), + } + .into_array(), + )) + } +} + #[derive(Debug)] struct ScalarFnAbstractReduceRule; impl ArrayReduceRule for ScalarFnAbstractReduceRule { fn reduce(&self, array: &ScalarFnArray) -> VortexResult> { if let Some(reduced) = array - .scalar_fn + .scalar_fn() .reduce(array, &ArrayReduceCtx { len: array.len })? { return Ok(Some( @@ -212,7 +245,7 @@ impl ArrayParentReduceRule for ScalarFnUnaryFilterPushDownRule { .try_collect()?; let new_array = - ScalarFnArray::try_new(child.scalar_fn.clone(), new_children, parent.len())? + ScalarFnArray::try_new(child.scalar_fn().clone(), new_children, parent.len())? .into_array(); return Ok(Some(new_array)); diff --git a/vortex-array/src/arrays/scalar_fn/slice.rs b/vortex-array/src/arrays/scalar_fn/slice.rs deleted file mode 100644 index b2389475b86..00000000000 --- a/vortex-array/src/arrays/scalar_fn/slice.rs +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: Copyright the Vortex contributors - -use std::ops::Range; - -use vortex_error::VortexResult; - -use crate::ArrayRef; -use crate::IntoArray; -use crate::arrays::ScalarFnArray; -use crate::arrays::ScalarFnVTable; -use crate::arrays::slice::SliceReduce; - -impl SliceReduce for ScalarFnVTable { - fn slice(array: &Self::Array, range: Range) -> VortexResult> { - let children: Vec<_> = array - .children() - .iter() - .map(|c| c.slice(range.clone())) - .collect::>()?; - - Ok(Some( - ScalarFnArray { - scalar_fn: array.scalar_fn.clone(), - dtype: array.dtype.clone(), - len: range.len(), - children, - stats: Default::default(), - } - .into_array(), - )) - } -} diff --git a/vortex-array/src/arrays/scalar_fn/vtable/mod.rs b/vortex-array/src/arrays/scalar_fn/vtable/mod.rs index 9d8131c7612..e2d5c396630 100644 --- a/vortex-array/src/arrays/scalar_fn/vtable/mod.rs +++ b/vortex-array/src/arrays/scalar_fn/vtable/mod.rs @@ -37,6 +37,7 @@ use crate::scalar_fn::Arity; use crate::scalar_fn::ChildName; use crate::scalar_fn::ExecutionArgs; use crate::scalar_fn::ScalarFnId; +use crate::scalar_fn::ScalarFnRef; use crate::scalar_fn::ScalarFnVTableExt; use crate::scalar_fn::VecExecutionArgs; use crate::serde::ArrayChildren; @@ -48,15 +49,22 @@ use crate::vtable::VTable; vtable!(ScalarFn, ScalarFnVTable); #[derive(Clone, Debug)] -pub struct ScalarFnVTable; +pub struct ScalarFnVTable { + pub(super) scalar_fn: ScalarFnRef, +} impl VTable for ScalarFnVTable { type Array = ScalarFnArray; type Metadata = ScalarFnMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn id(array: &Self::Array) -> ArrayId { - array.scalar_fn.id() + + fn vtable(array: &Self::Array) -> &Self { + &array.vtable + } + + fn id(&self) -> ArrayId { + self.scalar_fn.id() } fn len(array: &ScalarFnArray) -> usize { @@ -74,7 +82,7 @@ impl VTable for ScalarFnVTable { fn array_hash(array: &ScalarFnArray, state: &mut H, precision: Precision) { array.len.hash(state); array.dtype.hash(state); - array.scalar_fn.hash(state); + array.scalar_fn().hash(state); for child in &array.children { child.array_hash(state, precision); } @@ -87,7 +95,7 @@ impl VTable for ScalarFnVTable { if array.dtype != other.dtype { return false; } - if array.scalar_fn != other.scalar_fn { + if array.scalar_fn() != other.scalar_fn() { return false; } for (child, other_child) in array.children.iter().zip(other.children.iter()) { @@ -120,7 +128,7 @@ impl VTable for ScalarFnVTable { fn child_name(array: &ScalarFnArray, idx: usize) -> String { array - .scalar_fn + .scalar_fn() .signature() .child_name(idx) .as_ref() @@ -130,7 +138,7 @@ impl VTable for ScalarFnVTable { fn metadata(array: &Self::Array) -> VortexResult { let child_dtypes = array.children().iter().map(|c| c.dtype().clone()).collect(); Ok(ScalarFnMetadata { - scalar_fn: array.scalar_fn.clone(), + scalar_fn: array.scalar_fn().clone(), child_dtypes, }) } @@ -174,8 +182,9 @@ impl VTable for ScalarFnVTable { } Ok(ScalarFnArray { - // This requires a new Arc, but we plan to remove this later anyway. - scalar_fn: metadata.scalar_fn.clone(), + vtable: ScalarFnVTable { + scalar_fn: metadata.scalar_fn.clone(), + }, dtype: dtype.clone(), len, children, @@ -195,9 +204,12 @@ impl VTable for ScalarFnVTable { } fn execute(array: &Self::Array, ctx: &mut ExecutionCtx) -> VortexResult { - ctx.log(format_args!("scalar_fn({}): executing", array.scalar_fn)); + ctx.log(format_args!("scalar_fn({}): executing", array.scalar_fn())); let args = VecExecutionArgs::new(array.children.clone(), array.len); - array.scalar_fn.execute(&args, ctx).map(ExecutionStep::Done) + array + .scalar_fn() + .execute(&args, ctx) + .map(ExecutionStep::Done) } fn reduce(array: &Self::Array) -> VortexResult> { @@ -233,7 +245,7 @@ pub trait ScalarFnArrayExt: scalar_fn::ScalarFnVTable { let dtype = scalar_fn.return_dtype(&child_dtypes)?; Ok(ScalarFnArray { - scalar_fn, + vtable: ScalarFnVTable { scalar_fn }, dtype, len, children, @@ -272,7 +284,7 @@ impl Matcher for ExactScalarFn { fn try_match(array: &dyn DynArray) -> Option> { let scalar_fn_array = array.as_opt::()?; - let scalar_fn = scalar_fn_array.scalar_fn.downcast_ref::()?; + let scalar_fn = scalar_fn_array.scalar_fn().downcast_ref::()?; Some(ScalarFnArrayView { array, vtable: scalar_fn.vtable(), diff --git a/vortex-array/src/arrays/scalar_fn/vtable/operations.rs b/vortex-array/src/arrays/scalar_fn/vtable/operations.rs index 628c829a4c3..71761541093 100644 --- a/vortex-array/src/arrays/scalar_fn/vtable/operations.rs +++ b/vortex-array/src/arrays/scalar_fn/vtable/operations.rs @@ -25,13 +25,13 @@ impl OperationsVTable for ScalarFnVTable { let mut ctx = LEGACY_SESSION.create_execution_ctx(); let args = VecExecutionArgs::new(inputs, 1); - let result = array.scalar_fn.execute(&args, &mut ctx)?; + let result = array.scalar_fn().execute(&args, &mut ctx)?; let scalar = match result.execute::(&mut ctx)? { Columnar::Canonical(arr) => { tracing::info!( "Scalar function {} returned non-constant array from execution over all scalar inputs", - array.scalar_fn, + array.scalar_fn(), ); arr.as_ref().scalar_at(0)? } @@ -42,7 +42,7 @@ impl OperationsVTable for ScalarFnVTable { scalar.dtype(), &array.dtype, "Scalar function {} returned dtype {:?} but expected {:?}", - array.scalar_fn, + array.scalar_fn(), scalar.dtype(), array.dtype ); diff --git a/vortex-array/src/arrays/scalar_fn/vtable/validity.rs b/vortex-array/src/arrays/scalar_fn/vtable/validity.rs index 8da32d352ec..fc4a3b5a6c1 100644 --- a/vortex-array/src/arrays/scalar_fn/vtable/validity.rs +++ b/vortex-array/src/arrays/scalar_fn/vtable/validity.rs @@ -62,7 +62,7 @@ impl ValidityVTable for ScalarFnVTable { }) .collect::>()?; - let expr = Expression::try_new(array.scalar_fn.clone(), inputs)?; + let expr = Expression::try_new(array.scalar_fn().clone(), inputs)?; let validity_expr = array.scalar_fn().validity(&expr)?; // Execute the validity expression. All leaves are ArrayExpr nodes. diff --git a/vortex-array/src/arrays/shared/vtable.rs b/vortex-array/src/arrays/shared/vtable.rs index 5880ebae568..675ac56abce 100644 --- a/vortex-array/src/arrays/shared/vtable.rs +++ b/vortex-array/src/arrays/shared/vtable.rs @@ -44,7 +44,11 @@ impl VTable for Shared { type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Shared + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/slice/vtable.rs b/vortex-array/src/arrays/slice/vtable.rs index 367b5c5560c..535affae3e0 100644 --- a/vortex-array/src/arrays/slice/vtable.rs +++ b/vortex-array/src/arrays/slice/vtable.rs @@ -51,7 +51,11 @@ impl VTable for Slice { type Metadata = SliceMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Slice + } + + fn id(&self) -> ArrayId { Slice::ID } diff --git a/vortex-array/src/arrays/struct_/vtable/mod.rs b/vortex-array/src/arrays/struct_/vtable/mod.rs index 39df6e8783f..8868b7cc8c3 100644 --- a/vortex-array/src/arrays/struct_/vtable/mod.rs +++ b/vortex-array/src/arrays/struct_/vtable/mod.rs @@ -47,7 +47,11 @@ impl VTable for Struct { type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Struct + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/varbin/vtable/mod.rs b/vortex-array/src/arrays/varbin/vtable/mod.rs index a366cd6d0c1..def655047b8 100644 --- a/vortex-array/src/arrays/varbin/vtable/mod.rs +++ b/vortex-array/src/arrays/varbin/vtable/mod.rs @@ -57,7 +57,11 @@ impl VTable for VarBin { type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &VarBin + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/varbinview/vtable/mod.rs b/vortex-array/src/arrays/varbinview/vtable/mod.rs index 0c4decaa772..5e927a89a2d 100644 --- a/vortex-array/src/arrays/varbinview/vtable/mod.rs +++ b/vortex-array/src/arrays/varbinview/vtable/mod.rs @@ -54,7 +54,11 @@ impl VTable for VarBinView { type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &VarBinView + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/arrays/variant/vtable/mod.rs b/vortex-array/src/arrays/variant/vtable/mod.rs index 71ae0665212..8cdfb123ea0 100644 --- a/vortex-array/src/arrays/variant/vtable/mod.rs +++ b/vortex-array/src/arrays/variant/vtable/mod.rs @@ -46,7 +46,11 @@ impl VTable for Variant { type ValidityVTable = Self; - fn id(_array: &Self::Array) -> ArrayId { + fn vtable(_array: &Self::Array) -> &Self { + &Variant + } + + fn id(&self) -> ArrayId { Self::ID } diff --git a/vortex-array/src/lib.rs b/vortex-array/src/lib.rs index 1776569edbf..6dd206e4105 100644 --- a/vortex-array/src/lib.rs +++ b/vortex-array/src/lib.rs @@ -26,7 +26,7 @@ use vortex_session::VortexSession; use vortex_session::registry::Context; use crate::session::ArraySession; -use crate::vtable::DynVTable; +use crate::vtable::DynVTableRef; pub mod accessor; pub mod aggregate_fn; @@ -82,4 +82,4 @@ pub mod flatbuffers { pub static LEGACY_SESSION: LazyLock = LazyLock::new(|| VortexSession::empty().with::()); -pub type ArrayContext = Context<&'static dyn DynVTable>; +pub type ArrayContext = Context; diff --git a/vortex-array/src/session/mod.rs b/vortex-array/src/session/mod.rs index fc6405c3e13..3c7c920e692 100644 --- a/vortex-array/src/session/mod.rs +++ b/vortex-array/src/session/mod.rs @@ -1,6 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +use std::sync::Arc; + use vortex_session::Ref; use vortex_session::SessionExt; use vortex_session::registry::Registry; @@ -19,10 +21,10 @@ use crate::arrays::Primitive; use crate::arrays::Struct; use crate::arrays::VarBin; use crate::arrays::VarBinView; -use crate::vtable::ArrayId; -use crate::vtable::DynVTable; +use crate::vtable::DynVTableRef; +use crate::vtable::VTable; -pub type ArrayRegistry = Registry<&'static dyn DynVTable>; +pub type ArrayRegistry = Registry; #[derive(Debug)] pub struct ArraySession { @@ -31,41 +33,48 @@ pub struct ArraySession { } impl ArraySession { + pub fn empty() -> ArraySession { + Self { + registry: ArrayRegistry::default(), + } + } + pub fn registry(&self) -> &ArrayRegistry { &self.registry } /// Register a new array encoding, replacing any existing encoding with the same ID. - pub fn register(&self, id: impl Into, encoding: impl Into<&'static dyn DynVTable>) { - self.registry.register(id.into(), encoding.into()) + pub fn register(&self, vtable: V) { + self.registry + .register(vtable.id(), Arc::new(vtable) as DynVTableRef); } } impl Default for ArraySession { fn default() -> Self { - let encodings = ArrayRegistry::default(); + let this = ArraySession { + registry: ArrayRegistry::default(), + }; // Register the canonical encodings. - encodings.register(Null::ID, Null); - encodings.register(Bool::ID, Bool); - encodings.register(Primitive::ID, Primitive); - encodings.register(Decimal::ID, Decimal); - encodings.register(VarBinView::ID, VarBinView); - encodings.register(ListView::ID, ListView); - encodings.register(FixedSizeList::ID, FixedSizeList); - encodings.register(Struct::ID, Struct); - encodings.register(Extension::ID, Extension); + this.register(Null); + this.register(Bool); + this.register(Primitive); + this.register(Decimal); + this.register(VarBinView); + this.register(ListView); + this.register(FixedSizeList); + this.register(Struct); + this.register(Extension); // Register the utility encodings. - encodings.register(Chunked::ID, Chunked); - encodings.register(Constant::ID, Constant); - encodings.register(Masked::ID, Masked); - encodings.register(List::ID, List); - encodings.register(VarBin::ID, VarBin); + this.register(Chunked); + this.register(Constant); + this.register(Masked); + this.register(List); + this.register(VarBin); - Self { - registry: encodings, - } + this } } diff --git a/vortex-array/src/vtable/dyn_.rs b/vortex-array/src/vtable/dyn_.rs index 64ca5e99c50..0520ad9aaa1 100644 --- a/vortex-array/src/vtable/dyn_.rs +++ b/vortex-array/src/vtable/dyn_.rs @@ -1,11 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -use std::any::type_name; -use std::fmt; use std::fmt::Debug; -use std::fmt::Formatter; -use std::marker::PhantomData; +use std::sync::Arc; use arcref::ArcRef; use vortex_error::VortexExpect; @@ -27,15 +24,14 @@ use crate::vtable::VTable; /// ArrayId is a globally unique name for the array's vtable. pub type ArrayId = ArcRef; +/// Reference-counted DynVTable +pub type DynVTableRef = Arc; + /// Dynamically typed vtable trait. /// -/// This trait is sealed, therefore users should implement the strongly typed [`VTable`] trait -/// instead. The [`ArrayVTableExt::vtable`] function can be used to lift the implementation into -/// this object-safe form. -/// /// This trait contains the implementation API for Vortex arrays, allowing us to keep the public /// [`DynArray`] trait API to a minimum. -pub trait DynVTable: 'static + private::Sealed + Send + Sync + Debug { +pub trait DynVTable: 'static + Send + Sync + Debug { #[allow(clippy::too_many_arguments)] fn build( &self, @@ -73,11 +69,7 @@ pub trait DynVTable: 'static + private::Sealed + Send + Sync + Debug { ) -> VortexResult>; } -/// Adapter struct used to lift the [`VTable`] trait into an object-safe [`DynVTable`] -/// implementation. -struct ArrayVTableAdapter(PhantomData); - -impl DynVTable for ArrayVTableAdapter { +impl DynVTable for V { fn build( &self, _id: ArrayId, @@ -206,34 +198,3 @@ fn downcast(array: &ArrayRef) -> &V::Array { .vortex_expect("Failed to downcast array to expected encoding type") .as_inner() } - -impl Debug for ArrayVTableAdapter { - fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - write!(f, "Encoding<{}>", type_name::()) - } -} - -impl From for &'static dyn DynVTable { - fn from(_vtable: V) -> Self { - const { &ArrayVTableAdapter::(PhantomData) } - } -} - -pub trait ArrayVTableExt { - /// Wraps the vtable into an [`DynVTable`] by static reference. - fn vtable() -> &'static dyn DynVTable; -} - -impl ArrayVTableExt for V { - fn vtable() -> &'static dyn DynVTable { - const { &ArrayVTableAdapter::(PhantomData) } - } -} - -mod private { - use super::ArrayVTableAdapter; - use crate::vtable::VTable; - - pub trait Sealed {} - impl Sealed for ArrayVTableAdapter {} -} diff --git a/vortex-array/src/vtable/mod.rs b/vortex-array/src/vtable/mod.rs index 2b7ab9bd620..4018c8b9ead 100644 --- a/vortex-array/src/vtable/mod.rs +++ b/vortex-array/src/vtable/mod.rs @@ -55,8 +55,13 @@ pub trait VTable: 'static + Sized + Send + Sync + Debug { type OperationsVTable: OperationsVTable; type ValidityVTable: ValidityVTable; + /// Returns the VTable from the array instance. + /// + // NOTE(ngates): this function is temporary while we migrate Arrays over to the unified vtable + fn vtable(array: &Self::Array) -> &Self; + /// Returns the ID of the array. - fn id(array: &Self::Array) -> ArrayId; + fn id(&self) -> ArrayId; /// Returns the length of the array. fn len(array: &Self::Array) -> usize; diff --git a/vortex-file/src/lib.rs b/vortex-file/src/lib.rs index bf6114cb20e..d888eb88def 100644 --- a/vortex-file/src/lib.rs +++ b/vortex-file/src/lib.rs @@ -158,16 +158,16 @@ mod forever_constant { pub fn register_default_encodings(session: &mut VortexSession) { { let arrays = session.arrays(); - arrays.register(ByteBool::ID, ByteBool); - arrays.register(Dict::ID, Dict); - arrays.register(FSST::ID, FSST); - arrays.register(Pco::ID, Pco); - arrays.register(Sparse::ID, Sparse); - arrays.register(ZigZag::ID, ZigZag); + arrays.register(ByteBool); + arrays.register(Dict); + arrays.register(FSST); + arrays.register(Pco); + arrays.register(Sparse); + arrays.register(ZigZag); #[cfg(feature = "zstd")] - arrays.register(vortex_zstd::Zstd::ID, vortex_zstd::Zstd); + arrays.register(vortex_zstd::Zstd); #[cfg(all(feature = "zstd", feature = "unstable_encodings"))] - arrays.register(vortex_zstd::ZstdBuffers::ID, vortex_zstd::ZstdBuffers); + arrays.register(vortex_zstd::ZstdBuffers); } // Eventually all encodings crates should expose an initialize function. For now it's only diff --git a/vortex-file/src/strategy.rs b/vortex-file/src/strategy.rs index 9645e09df34..4d6031a220c 100644 --- a/vortex-file/src/strategy.rs +++ b/vortex-file/src/strategy.rs @@ -27,6 +27,7 @@ use vortex_array::arrays::VarBin; use vortex_array::arrays::VarBinView; use vortex_array::dtype::FieldPath; use vortex_array::session::ArrayRegistry; +use vortex_array::session::ArraySession; #[cfg(feature = "zstd")] use vortex_btrblocks::BtrBlocksCompressorBuilder; #[cfg(feature = "zstd")] @@ -74,48 +75,48 @@ const ONE_MEG: u64 = 1 << 20; /// This includes all canonical encodings from vortex-array plus all compressed /// encodings from the various encoding crates. pub static ALLOWED_ENCODINGS: LazyLock = LazyLock::new(|| { - let registry = ArrayRegistry::default(); + let session = ArraySession::empty(); // Canonical encodings from vortex-array - registry.register(Null::ID, Null); - registry.register(Bool::ID, Bool); - registry.register(Primitive::ID, Primitive); - registry.register(Decimal::ID, Decimal); - registry.register(VarBin::ID, VarBin); - registry.register(VarBinView::ID, VarBinView); - registry.register(List::ID, List); - registry.register(ListView::ID, ListView); - registry.register(FixedSizeList::ID, FixedSizeList); - registry.register(Struct::ID, Struct); - registry.register(Extension::ID, Extension); - registry.register(Chunked::ID, Chunked); - registry.register(Constant::ID, Constant); - registry.register(Masked::ID, Masked); - registry.register(Dict::ID, Dict); + session.register(Null); + session.register(Bool); + session.register(Primitive); + session.register(Decimal); + session.register(VarBin); + session.register(VarBinView); + session.register(List); + session.register(ListView); + session.register(FixedSizeList); + session.register(Struct); + session.register(Extension); + session.register(Chunked); + session.register(Constant); + session.register(Masked); + session.register(Dict); // Compressed encodings from encoding crates - registry.register(ALP::ID, ALP); - registry.register(ALPRD::ID, ALPRD); - registry.register(BitPacked::ID, BitPacked); - registry.register(ByteBool::ID, ByteBool); - registry.register(DateTimeParts::ID, DateTimeParts); - registry.register(DecimalByteParts::ID, DecimalByteParts); - registry.register(Delta::ID, Delta); - registry.register(FoR::ID, FoR); - registry.register(FSST::ID, FSST); - registry.register(Pco::ID, Pco); - registry.register(RLE::ID, RLE); - registry.register(RunEnd::ID, RunEnd); - registry.register(Sequence::ID, Sequence); - registry.register(Sparse::ID, Sparse); - registry.register(ZigZag::ID, ZigZag); + session.register(ALP); + session.register(ALPRD); + session.register(BitPacked); + session.register(ByteBool); + session.register(DateTimeParts); + session.register(DecimalByteParts); + session.register(Delta); + session.register(FoR); + session.register(FSST); + session.register(Pco); + session.register(RLE); + session.register(RunEnd); + session.register(Sequence); + session.register(Sparse); + session.register(ZigZag); #[cfg(feature = "zstd")] - registry.register(Zstd::ID, Zstd); + session.register(Zstd); #[cfg(all(feature = "zstd", feature = "unstable_encodings"))] - registry.register(ZstdBuffers::ID, ZstdBuffers); + session.register(ZstdBuffers); - registry + session.registry().clone() }); /// Build a new [writer strategy][LayoutStrategy] to compress and reorganize chunks of a Vortex file. diff --git a/vortex-layout/src/layouts/flat/writer.rs b/vortex-layout/src/layouts/flat/writer.rs index 0e83f717f49..8f01669638e 100644 --- a/vortex-layout/src/layouts/flat/writer.rs +++ b/vortex-layout/src/layouts/flat/writer.rs @@ -219,6 +219,8 @@ mod tests { use vortex_array::expr::stats::StatsProviderExt; use vortex_array::session::ArrayRegistry; use vortex_array::validity::Validity; + use vortex_array::vtable::DynVTableRef; + use vortex_array::vtable::VTable; use vortex_buffer::BitBufferMut; use vortex_buffer::buffer; use vortex_error::VortexExpect; @@ -426,7 +428,7 @@ mod tests { let (ptr, eof) = SequenceId::root().split(); // Only allow primitive encodings - filter arrays should fail. let allowed = ArrayRegistry::default(); - allowed.register(Primitive::ID, Primitive); + allowed.register(Primitive::ID, Arc::new(Primitive) as DynVTableRef); let layout = FlatLayoutStrategy::default() .with_allow_encodings(allowed) .write_stream( @@ -467,8 +469,8 @@ mod tests { let (ptr, eof) = SequenceId::root().split(); // Only allow primitive encodings - filter arrays should fail. let allowed = ArrayRegistry::default(); - allowed.register(Primitive::ID, Primitive); - allowed.register(Dict::ID, Dict); + allowed.register(Primitive.id(), Arc::new(Primitive) as DynVTableRef); + allowed.register(Dict.id(), Arc::new(Dict) as DynVTableRef); let layout = FlatLayoutStrategy::default() .with_allow_encodings(allowed) .write_stream( diff --git a/vortex-python/src/arrays/py/array.rs b/vortex-python/src/arrays/py/array.rs index 48d623efa4d..9163ae0c37d 100644 --- a/vortex-python/src/arrays/py/array.rs +++ b/vortex-python/src/arrays/py/array.rs @@ -9,10 +9,10 @@ use pyo3::Py; use pyo3::PyAny; use pyo3::prelude::*; use vortex::array::stats::ArrayStats; -use vortex::array::vtable::ArrayId; use vortex::dtype::DType; use crate::arrays::py::PyPythonArray; +use crate::arrays::py::PythonVTable; use crate::error::PyVortexError; /// Wrapper struct encapsulating a Vortex array implemented using a Python object. @@ -21,7 +21,7 @@ use crate::error::PyVortexError; /// will ensure the object implements the necessary methods. #[derive(Debug, Clone)] pub struct PythonArray { - pub(super) id: ArrayId, + pub(super) vtable: PythonVTable, pub(super) object: Arc>, pub(super) len: usize, pub(super) dtype: DType, @@ -35,7 +35,9 @@ impl<'py> FromPyObject<'_, 'py> for PythonArray { let ob_cast = ob.cast::()?; let python_array = ob_cast.get(); Ok(Self { - id: python_array.id.clone(), + vtable: PythonVTable { + id: python_array.id.clone(), + }, object: Arc::new(ob.to_owned().unbind()), len: python_array.len, dtype: python_array.dtype.clone(), diff --git a/vortex-python/src/arrays/py/vtable.rs b/vortex-python/src/arrays/py/vtable.rs index c69961bfa18..c677c66d645 100644 --- a/vortex-python/src/arrays/py/vtable.rs +++ b/vortex-python/src/arrays/py/vtable.rs @@ -32,21 +32,27 @@ use vortex::session::VortexSession; use crate::arrays::py::PythonArray; -vtable!(Python); +vtable!(Python, PythonVTable); /// Wrapper struct encapsulating a Python encoding. -#[derive(Debug)] -pub struct Python; +#[derive(Debug, Clone)] +pub struct PythonVTable { + pub id: ArrayId, +} -impl VTable for Python { +impl VTable for PythonVTable { type Array = PythonArray; type Metadata = RawMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn id(array: &Self::Array) -> ArrayId { - array.id.clone() + fn vtable(array: &Self::Array) -> &Self { + &array.vtable + } + + fn id(&self) -> ArrayId { + self.id.clone() } fn len(array: &PythonArray) -> usize { @@ -63,14 +69,14 @@ impl VTable for Python { fn array_hash(array: &PythonArray, state: &mut H, _precision: Precision) { Arc::as_ptr(&array.object).hash(state); - array.id.hash(state); + array.vtable.id.hash(state); array.len.hash(state); array.dtype.hash(state); } fn array_eq(array: &PythonArray, other: &PythonArray, _precision: Precision) -> bool { Arc::ptr_eq(&array.object, &other.object) - && array.id == other.id + && array.vtable.id == other.vtable.id // TODO(ngates): in the future this check is already done && array.len == other.len && array.dtype == other.dtype } @@ -100,7 +106,7 @@ impl VTable for Python { } fn metadata(array: &PythonArray) -> VortexResult { - pyo3::Python::attach(|py| { + Python::attach(|py| { let obj = array.object.bind(py); if !obj .hasattr(intern!(py, "metadata")) @@ -160,13 +166,13 @@ impl VTable for Python { } } -impl OperationsVTable for Python { +impl OperationsVTable for PythonVTable { fn scalar_at(_array: &PythonArray, _index: usize) -> VortexResult { todo!() } } -impl ValidityVTable for Python { +impl ValidityVTable for PythonVTable { fn validity(_array: &PythonArray) -> VortexResult { todo!() } diff --git a/vortex-python/src/registry.rs b/vortex-python/src/registry.rs index 1c2a19d2c08..f04ef1a8022 100644 --- a/vortex-python/src/registry.rs +++ b/vortex-python/src/registry.rs @@ -7,7 +7,7 @@ use pyo3::prelude::*; use vortex::array::session::ArraySessionExt; use crate::SESSION; -use crate::arrays::py::Python as PythonVTable; +use crate::arrays::py::PythonVTable; use crate::arrays::py::id_from_obj; use crate::error::PyVortexResult; use crate::install_module; @@ -31,6 +31,6 @@ pub(crate) fn register(cls: &Bound) -> PyVortexResult<()> { let id = id_from_obj(cls)?; // TODO(ngates): we would need to register the Python class object in a PyVortexSession // to call back into it during deserialize operations. - SESSION.arrays().register(id, PythonVTable); + SESSION.arrays().register(PythonVTable { id }); Ok(()) }