diff --git a/encodings/alp/public-api.lock b/encodings/alp/public-api.lock index 02caae83d0b..bdfa85f4d88 100644 --- a/encodings/alp/public-api.lock +++ b/encodings/alp/public-api.lock @@ -42,7 +42,7 @@ pub fn vortex_alp::ALP::id(&self) -> vortex_array::array::ArrayId pub fn vortex_alp::ALP::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_alp::ALP::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_alp::ALP::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_alp::ALP::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -178,7 +178,7 @@ pub fn vortex_alp::ALPRD::id(&self) -> vortex_array::array::ArrayId pub fn vortex_alp::ALPRD::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_alp::ALPRD::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_alp::ALPRD::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_alp::ALPRD::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> diff --git a/encodings/alp/src/alp/array.rs b/encodings/alp/src/alp/array.rs index 63549dc24f8..4a3c0231fde 100644 --- a/encodings/alp/src/alp/array.rs +++ b/encodings/alp/src/alp/array.rs @@ -18,6 +18,7 @@ use vortex_array::ArrayView; use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::TypedArrayRef; use vortex_array::array_slots; @@ -191,7 +192,7 @@ impl VTable for ALP { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { RULES.evaluate(array, parent, child_idx) diff --git a/encodings/alp/src/alp_rd/array.rs b/encodings/alp/src/alp_rd/array.rs index 0c25717db6f..73d241da790 100644 --- a/encodings/alp/src/alp_rd/array.rs +++ b/encodings/alp/src/alp_rd/array.rs @@ -21,6 +21,7 @@ use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::TypedArrayRef; use vortex_array::VortexSessionExecute; @@ -306,7 +307,7 @@ impl VTable for ALPRD { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { RULES.evaluate(array, parent, child_idx) diff --git a/encodings/bytebool/public-api.lock b/encodings/bytebool/public-api.lock index afbeea54ac4..d46f83bd385 100644 --- a/encodings/bytebool/public-api.lock +++ b/encodings/bytebool/public-api.lock @@ -40,7 +40,7 @@ pub fn vortex_bytebool::ByteBool::id(&self) -> vortex_array::array::ArrayId pub fn vortex_bytebool::ByteBool::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_bytebool::ByteBool::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_bytebool::ByteBool::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_bytebool::ByteBool::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> diff --git a/encodings/bytebool/src/array.rs b/encodings/bytebool/src/array.rs index 538c6c079f3..ab7fa83ed41 100644 --- a/encodings/bytebool/src/array.rs +++ b/encodings/bytebool/src/array.rs @@ -16,6 +16,7 @@ use vortex_array::ArrayView; use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::TypedArrayRef; use vortex_array::arrays::BoolArray; @@ -142,7 +143,7 @@ impl VTable for ByteBool { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { crate::rules::RULES.evaluate(array, parent, child_idx) diff --git a/encodings/datetime-parts/public-api.lock b/encodings/datetime-parts/public-api.lock index 97aaa5dec69..2c27549b3a4 100644 --- a/encodings/datetime-parts/public-api.lock +++ b/encodings/datetime-parts/public-api.lock @@ -38,7 +38,7 @@ pub fn vortex_datetime_parts::DateTimeParts::id(&self) -> vortex_array::array::A pub fn vortex_datetime_parts::DateTimeParts::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_datetime_parts::DateTimeParts::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_datetime_parts::DateTimeParts::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_datetime_parts::DateTimeParts::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> diff --git a/encodings/datetime-parts/src/array.rs b/encodings/datetime-parts/src/array.rs index 86e1927422e..146252bbe20 100644 --- a/encodings/datetime-parts/src/array.rs +++ b/encodings/datetime-parts/src/array.rs @@ -18,6 +18,7 @@ use vortex_array::ArrayView; use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::array_slots; use vortex_array::arrays::Primitive; @@ -194,7 +195,7 @@ impl VTable for DateTimeParts { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/encodings/decimal-byte-parts/public-api.lock b/encodings/decimal-byte-parts/public-api.lock index d2d62792fbd..42ebcaab3a8 100644 --- a/encodings/decimal-byte-parts/public-api.lock +++ b/encodings/decimal-byte-parts/public-api.lock @@ -36,7 +36,7 @@ pub fn vortex_decimal_byte_parts::DecimalByteParts::id(&self) -> vortex_array::a pub fn vortex_decimal_byte_parts::DecimalByteParts::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_decimal_byte_parts::DecimalByteParts::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_decimal_byte_parts::DecimalByteParts::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_decimal_byte_parts::DecimalByteParts::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> 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 80a7772d986..b9ad2157258 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs @@ -20,6 +20,7 @@ use vortex_array::ArrayRef; use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::TypedArrayRef; use vortex_array::arrays::DecimalArray; @@ -155,7 +156,7 @@ impl VTable for DecimalByteParts { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/encodings/fastlanes/public-api.lock b/encodings/fastlanes/public-api.lock index bbd1f18ab4c..18d1d70c2d1 100644 --- a/encodings/fastlanes/public-api.lock +++ b/encodings/fastlanes/public-api.lock @@ -158,7 +158,7 @@ pub fn vortex_fastlanes::BitPacked::id(&self) -> vortex_array::array::ArrayId pub fn vortex_fastlanes::BitPacked::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_fastlanes::BitPacked::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_fastlanes::BitPacked::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_fastlanes::BitPacked::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -314,7 +314,7 @@ pub fn vortex_fastlanes::Delta::id(&self) -> vortex_array::array::ArrayId pub fn vortex_fastlanes::Delta::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_fastlanes::Delta::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_fastlanes::Delta::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_fastlanes::Delta::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -402,7 +402,7 @@ pub fn vortex_fastlanes::FoR::id(&self) -> vortex_array::array::ArrayId pub fn vortex_fastlanes::FoR::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_fastlanes::FoR::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_fastlanes::FoR::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_fastlanes::FoR::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -508,7 +508,7 @@ pub fn vortex_fastlanes::RLE::id(&self) -> vortex_array::array::ArrayId pub fn vortex_fastlanes::RLE::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_fastlanes::RLE::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_fastlanes::RLE::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_fastlanes::RLE::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> diff --git a/encodings/fastlanes/src/bitpacking/compute/slice.rs b/encodings/fastlanes/src/bitpacking/compute/slice.rs index e6e51c57591..d2ccddbcca7 100644 --- a/encodings/fastlanes/src/bitpacking/compute/slice.rs +++ b/encodings/fastlanes/src/bitpacking/compute/slice.rs @@ -47,6 +47,7 @@ impl SliceReduce for BitPacked { mod tests { use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; + use vortex_array::ParentRef; use vortex_array::VortexSessionExecute; use vortex_array::arrays::PrimitiveArray; use vortex_array::arrays::SliceArray; @@ -61,11 +62,11 @@ mod tests { let values = PrimitiveArray::from_iter(0u32..2048); let bitpacked = bitpack_encode(&values, 11, None, &mut ctx)?; - let slice_array = SliceArray::new(bitpacked.clone().into_array(), 500..1500); + let slice_array = SliceArray::new(bitpacked.clone().into_array(), 500..1500).into_array(); let bitpacked_ref = bitpacked.into_array(); let reduced = bitpacked_ref - .reduce_parent(&slice_array.into_array(), 0)? + .reduce_parent(&ParentRef::from_array_ref(&slice_array), 0)? .expect("expected slice kernel to execute"); assert!(reduced.is::()); diff --git a/encodings/fastlanes/src/bitpacking/vtable/mod.rs b/encodings/fastlanes/src/bitpacking/vtable/mod.rs index c11a6c4ec51..7a5e564b7ad 100644 --- a/encodings/fastlanes/src/bitpacking/vtable/mod.rs +++ b/encodings/fastlanes/src/bitpacking/vtable/mod.rs @@ -15,6 +15,7 @@ use vortex_array::ArrayView; use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::buffer::BufferHandle; use vortex_array::builders::ArrayBuilder; @@ -300,7 +301,7 @@ impl VTable for BitPacked { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { RULES.evaluate(array, parent, child_idx) diff --git a/encodings/fastlanes/src/bitpacking/vtable/operations.rs b/encodings/fastlanes/src/bitpacking/vtable/operations.rs index 6b82343d318..28c8a25de29 100644 --- a/encodings/fastlanes/src/bitpacking/vtable/operations.rs +++ b/encodings/fastlanes/src/bitpacking/vtable/operations.rs @@ -35,6 +35,7 @@ mod test { use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; + use vortex_array::ParentRef; use vortex_array::VortexSessionExecute; use vortex_array::arrays::PrimitiveArray; use vortex_array::arrays::SliceArray; @@ -63,9 +64,9 @@ mod test { fn slice_via_reduce(array: &BitPackedArray, range: Range) -> BitPackedArray { let array_ref = array.clone().into_array(); - let slice_array = SliceArray::new(array_ref.clone(), range); + let slice_array = SliceArray::new(array_ref.clone(), range).into_array(); let sliced = array_ref - .reduce_parent(&slice_array.into_array(), 0) + .reduce_parent(&ParentRef::from_array_ref(&slice_array), 0) .expect("execute_parent failed") .expect("expected slice kernel to execute"); sliced.as_::().into_owned() diff --git a/encodings/fastlanes/src/delta/vtable/mod.rs b/encodings/fastlanes/src/delta/vtable/mod.rs index 17e571ba4f6..898e44ee586 100644 --- a/encodings/fastlanes/src/delta/vtable/mod.rs +++ b/encodings/fastlanes/src/delta/vtable/mod.rs @@ -16,6 +16,7 @@ use vortex_array::ArrayView; use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::arrays::PrimitiveArray; use vortex_array::buffer::BufferHandle; @@ -111,7 +112,7 @@ impl VTable for Delta { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { rules::RULES.evaluate(array, parent, child_idx) diff --git a/encodings/fastlanes/src/for/vtable/mod.rs b/encodings/fastlanes/src/for/vtable/mod.rs index 85f7cf2429b..ea4c9339947 100644 --- a/encodings/fastlanes/src/for/vtable/mod.rs +++ b/encodings/fastlanes/src/for/vtable/mod.rs @@ -15,6 +15,7 @@ use vortex_array::ArrayView; use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::arrays::PrimitiveArray; use vortex_array::buffer::BufferHandle; @@ -140,7 +141,7 @@ impl VTable for FoR { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/encodings/fastlanes/src/rle/vtable/mod.rs b/encodings/fastlanes/src/rle/vtable/mod.rs index ed549301433..b6b22ed15fa 100644 --- a/encodings/fastlanes/src/rle/vtable/mod.rs +++ b/encodings/fastlanes/src/rle/vtable/mod.rs @@ -15,6 +15,7 @@ use vortex_array::ArrayView; use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::arrays::Primitive; use vortex_array::buffer::BufferHandle; @@ -122,7 +123,7 @@ impl VTable for RLE { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { RULES.evaluate(array, parent, child_idx) diff --git a/encodings/fsst/public-api.lock b/encodings/fsst/public-api.lock index bc2400e19d6..de74f54753b 100644 --- a/encodings/fsst/public-api.lock +++ b/encodings/fsst/public-api.lock @@ -38,7 +38,7 @@ pub fn vortex_fsst::FSST::id(&self) -> vortex_array::array::ArrayId pub fn vortex_fsst::FSST::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_fsst::FSST::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_fsst::FSST::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_fsst::FSST::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> diff --git a/encodings/fsst/src/array.rs b/encodings/fsst/src/array.rs index 36e57c51239..01e087ac603 100644 --- a/encodings/fsst/src/array.rs +++ b/encodings/fsst/src/array.rs @@ -24,6 +24,7 @@ use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::TypedArrayRef; use vortex_array::VortexSessionExecute; @@ -317,7 +318,7 @@ impl VTable for FSST { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { RULES.evaluate(array, parent, child_idx) diff --git a/encodings/pco/public-api.lock b/encodings/pco/public-api.lock index 25544357593..41af5dc75a0 100644 --- a/encodings/pco/public-api.lock +++ b/encodings/pco/public-api.lock @@ -34,7 +34,7 @@ pub fn vortex_pco::Pco::id(&self) -> vortex_array::array::ArrayId pub fn vortex_pco::Pco::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_pco::Pco::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_pco::Pco::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_pco::Pco::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> diff --git a/encodings/pco/src/array.rs b/encodings/pco/src/array.rs index 21d748927d4..04672187d41 100644 --- a/encodings/pco/src/array.rs +++ b/encodings/pco/src/array.rs @@ -28,6 +28,7 @@ use vortex_array::ArrayView; use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::arrays::Primitive; use vortex_array::arrays::PrimitiveArray; @@ -230,7 +231,7 @@ impl VTable for Pco { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { crate::rules::RULES.evaluate(array, parent, child_idx) diff --git a/encodings/runend/public-api.lock b/encodings/runend/public-api.lock index 63c9f9857fe..19f74d3aabf 100644 --- a/encodings/runend/public-api.lock +++ b/encodings/runend/public-api.lock @@ -60,7 +60,7 @@ pub fn vortex_runend::RunEnd::id(&self) -> vortex_array::array::ArrayId pub fn vortex_runend::RunEnd::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_runend::RunEnd::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_runend::RunEnd::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_runend::RunEnd::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> diff --git a/encodings/runend/src/array.rs b/encodings/runend/src/array.rs index 7fe1c70461d..164633cc504 100644 --- a/encodings/runend/src/array.rs +++ b/encodings/runend/src/array.rs @@ -19,6 +19,7 @@ use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::TypedArrayRef; use vortex_array::VortexSessionExecute; @@ -165,7 +166,7 @@ impl VTable for RunEnd { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { RULES.evaluate(array, parent, child_idx) diff --git a/encodings/sequence/public-api.lock b/encodings/sequence/public-api.lock index 96924559159..195bfaf45cb 100644 --- a/encodings/sequence/public-api.lock +++ b/encodings/sequence/public-api.lock @@ -38,7 +38,7 @@ pub fn vortex_sequence::Sequence::id(&self) -> vortex_array::array::ArrayId pub fn vortex_sequence::Sequence::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_sequence::Sequence::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_sequence::Sequence::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_sequence::Sequence::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> diff --git a/encodings/sequence/src/array.rs b/encodings/sequence/src/array.rs index 4a85f3a4c0b..1bc76374290 100644 --- a/encodings/sequence/src/array.rs +++ b/encodings/sequence/src/array.rs @@ -17,6 +17,7 @@ use vortex_array::ArrayRef; use vortex_array::ArrayView; use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::buffer::BufferHandle; use vortex_array::dtype::DType; @@ -341,7 +342,7 @@ impl VTable for Sequence { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { RULES.evaluate(array, parent, child_idx) diff --git a/encodings/sparse/public-api.lock b/encodings/sparse/public-api.lock index c8e9abb533a..17f2faf9765 100644 --- a/encodings/sparse/public-api.lock +++ b/encodings/sparse/public-api.lock @@ -40,7 +40,7 @@ pub fn vortex_sparse::Sparse::id(&self) -> vortex_array::array::ArrayId pub fn vortex_sparse::Sparse::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_sparse::Sparse::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_sparse::Sparse::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_sparse::Sparse::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> diff --git a/encodings/sparse/src/lib.rs b/encodings/sparse/src/lib.rs index 411bc9c7543..cefce9be0b0 100644 --- a/encodings/sparse/src/lib.rs +++ b/encodings/sparse/src/lib.rs @@ -20,6 +20,7 @@ use vortex_array::Canonical; use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::arrays::BoolArray; use vortex_array::arrays::ConstantArray; @@ -191,7 +192,7 @@ impl VTable for Sparse { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { RULES.evaluate(array, parent, child_idx) diff --git a/encodings/zigzag/public-api.lock b/encodings/zigzag/public-api.lock index f38988cd680..03f978bf101 100644 --- a/encodings/zigzag/public-api.lock +++ b/encodings/zigzag/public-api.lock @@ -36,7 +36,7 @@ pub fn vortex_zigzag::ZigZag::id(&self) -> vortex_array::array::ArrayId pub fn vortex_zigzag::ZigZag::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_zigzag::ZigZag::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_zigzag::ZigZag::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_zigzag::ZigZag::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> diff --git a/encodings/zigzag/src/array.rs b/encodings/zigzag/src/array.rs index 52658e53961..5389184da8f 100644 --- a/encodings/zigzag/src/array.rs +++ b/encodings/zigzag/src/array.rs @@ -15,6 +15,7 @@ use vortex_array::ArrayView; use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::TypedArrayRef; use vortex_array::buffer::BufferHandle; @@ -137,7 +138,7 @@ impl VTable for ZigZag { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { RULES.evaluate(array, parent, child_idx) diff --git a/encodings/zstd/public-api.lock b/encodings/zstd/public-api.lock index ef3cfff174a..633943e1191 100644 --- a/encodings/zstd/public-api.lock +++ b/encodings/zstd/public-api.lock @@ -42,7 +42,7 @@ pub fn vortex_zstd::Zstd::id(&self) -> vortex_array::array::ArrayId pub fn vortex_zstd::Zstd::nbuffers(vortex_array::array::view::ArrayView<'_, Self>) -> usize -pub fn vortex_zstd::Zstd::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::erased::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_zstd::Zstd::reduce_parent(vortex_array::array::view::ArrayView<'_, Self>, &vortex_array::array::parent::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_zstd::Zstd::serialize(vortex_array::array::view::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> diff --git a/encodings/zstd/src/array.rs b/encodings/zstd/src/array.rs index 2a685f1ea2a..a282a88c9fc 100644 --- a/encodings/zstd/src/array.rs +++ b/encodings/zstd/src/array.rs @@ -21,6 +21,7 @@ use vortex_array::Canonical; use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; +use vortex_array::ParentRef; use vortex_array::Precision; use vortex_array::accessor::ArrayAccessor; use vortex_array::arrays::ConstantArray; @@ -243,7 +244,7 @@ impl VTable for Zstd { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { crate::rules::RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/public-api.lock b/vortex-array/public-api.lock index b6de5284907..6c3b0dcccf3 100644 --- a/vortex-array/public-api.lock +++ b/vortex-array/public-api.lock @@ -1402,7 +1402,7 @@ pub fn vortex_array::arrays::Bool::nchildren(vortex_array::ArrayView<'_, Self>) pub fn vortex_array::arrays::Bool::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Bool::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Bool::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Bool::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -1432,6 +1432,8 @@ pub type vortex_array::arrays::bool::BoolMaskedValidityRule::Parent = vortex_arr pub fn vortex_array::arrays::bool::BoolMaskedValidityRule::reduce_parent(&self, vortex_array::ArrayView<'_, vortex_array::arrays::Bool>, vortex_array::ArrayView<'_, vortex_array::arrays::Masked>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::bool::BoolMaskedValidityRule::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::scalar_fn::fns::cast::CastKernel for vortex_array::arrays::Bool pub fn vortex_array::arrays::Bool::cast(vortex_array::ArrayView<'_, vortex_array::arrays::Bool>, &vortex_array::dtype::DType, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> @@ -1498,6 +1500,8 @@ pub type vortex_array::arrays::bool::BoolMaskedValidityRule::Parent = vortex_arr pub fn vortex_array::arrays::bool::BoolMaskedValidityRule::reduce_parent(&self, vortex_array::ArrayView<'_, vortex_array::arrays::Bool>, vortex_array::ArrayView<'_, vortex_array::arrays::Masked>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::bool::BoolMaskedValidityRule::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + pub trait vortex_array::arrays::bool::BoolArrayExt: vortex_array::TypedArrayRef pub fn vortex_array::arrays::bool::BoolArrayExt::execute_mask(&self, &mut vortex_array::ExecutionCtx) -> vortex_mask::Mask @@ -1576,7 +1580,7 @@ pub fn vortex_array::arrays::Chunked::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Chunked::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Chunked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Chunked::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -1740,7 +1744,7 @@ pub fn vortex_array::arrays::Constant::nchildren(vortex_array::ArrayView<'_, Sel pub fn vortex_array::arrays::Constant::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Constant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Constant::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -1920,7 +1924,7 @@ pub fn vortex_array::arrays::Decimal::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Decimal::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Decimal::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Decimal::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -1946,6 +1950,8 @@ pub type vortex_array::arrays::decimal::DecimalMaskedValidityRule::Parent = vort pub fn vortex_array::arrays::decimal::DecimalMaskedValidityRule::reduce_parent(&self, vortex_array::ArrayView<'_, vortex_array::arrays::Decimal>, vortex_array::ArrayView<'_, vortex_array::arrays::Masked>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::decimal::DecimalMaskedValidityRule::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::scalar_fn::fns::between::BetweenKernel for vortex_array::arrays::Decimal pub fn vortex_array::arrays::Decimal::between(vortex_array::ArrayView<'_, vortex_array::arrays::Decimal>, &vortex_array::ArrayRef, &vortex_array::ArrayRef, &vortex_array::scalar_fn::fns::between::BetweenOptions, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> @@ -2046,6 +2052,8 @@ pub type vortex_array::arrays::decimal::DecimalMaskedValidityRule::Parent = vort pub fn vortex_array::arrays::decimal::DecimalMaskedValidityRule::reduce_parent(&self, vortex_array::ArrayView<'_, vortex_array::arrays::Decimal>, vortex_array::ArrayView<'_, vortex_array::arrays::Masked>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::decimal::DecimalMaskedValidityRule::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + pub trait vortex_array::arrays::decimal::DecimalArrayExt: vortex_array::TypedArrayRef pub fn vortex_array::arrays::decimal::DecimalArrayExt::buffer(&self) -> vortex_buffer::buffer::Buffer @@ -2140,7 +2148,7 @@ pub fn vortex_array::arrays::dict::Dict::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::dict::Dict::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::dict::Dict::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::dict::Dict::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -2232,7 +2240,7 @@ pub fn vortex_array::arrays::dict::Dict::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::dict::Dict::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::dict::Dict::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::dict::Dict::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -2418,6 +2426,8 @@ pub type vortex_array::arrays::dict::TakeReduceAdaptor::Parent = vortex_array pub fn vortex_array::arrays::dict::TakeReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::ArrayView<'_, vortex_array::arrays::dict::Dict>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::TakeReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + pub trait vortex_array::arrays::dict::DictArrayExt: vortex_array::TypedArrayRef + vortex_array::arrays::dict::DictArraySlotsExt pub fn vortex_array::arrays::dict::DictArrayExt::compute_referenced_values_mask(&self, bool) -> vortex_error::VortexResult @@ -2584,7 +2594,7 @@ pub fn vortex_array::arrays::Extension::nchildren(vortex_array::ArrayView<'_, Se pub fn vortex_array::arrays::Extension::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Extension::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Extension::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -2682,7 +2692,7 @@ pub fn vortex_array::arrays::Filter::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Filter::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Filter::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Filter::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Filter::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -2708,6 +2718,8 @@ pub fn vortex_array::arrays::filter::FilterData::len(&self) -> usize pub fn vortex_array::arrays::filter::FilterData::new(vortex_mask::Mask) -> Self +pub fn vortex_array::arrays::filter::FilterData::try_new(usize, vortex_mask::Mask) -> vortex_error::VortexResult + impl core::clone::Clone for vortex_array::arrays::filter::FilterData pub fn vortex_array::arrays::filter::FilterData::clone(&self) -> vortex_array::arrays::filter::FilterData @@ -2764,6 +2776,8 @@ pub type vortex_array::arrays::filter::FilterReduceAdaptor::Parent = vortex_a pub fn vortex_array::arrays::filter::FilterReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::ArrayView<'_, vortex_array::arrays::Filter>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::filter::FilterReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + pub trait vortex_array::arrays::filter::FilterArrayExt: vortex_array::TypedArrayRef pub fn vortex_array::arrays::filter::FilterArrayExt::child(&self) -> &vortex_array::ArrayRef @@ -2870,7 +2884,7 @@ pub fn vortex_array::arrays::FixedSizeList::nchildren(vortex_array::ArrayView<'_ pub fn vortex_array::arrays::FixedSizeList::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::FixedSizeList::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::FixedSizeList::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -3014,7 +3028,7 @@ pub fn vortex_array::arrays::List::nchildren(vortex_array::ArrayView<'_, Self>) pub fn vortex_array::arrays::List::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::List::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::List::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -3194,7 +3208,7 @@ pub fn vortex_array::arrays::ListView::nchildren(vortex_array::ArrayView<'_, Sel pub fn vortex_array::arrays::ListView::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::ListView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::ListView::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -3378,7 +3392,7 @@ pub fn vortex_array::arrays::Masked::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Masked::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Masked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Masked::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -3528,7 +3542,7 @@ pub fn vortex_array::arrays::null::Null::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::null::Null::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::null::Null::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::null::Null::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -3614,7 +3628,7 @@ pub fn vortex_array::arrays::patched::Patched::nchildren(vortex_array::ArrayView pub fn vortex_array::arrays::patched::Patched::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::patched::Patched::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::patched::Patched::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::patched::Patched::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -3900,7 +3914,7 @@ pub fn vortex_array::arrays::Primitive::nchildren(vortex_array::ArrayView<'_, Se pub fn vortex_array::arrays::Primitive::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Primitive::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Primitive::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -3926,6 +3940,8 @@ pub type vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::Parent = pub fn vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::reduce_parent(&self, vortex_array::ArrayView<'_, vortex_array::arrays::Primitive>, vortex_array::ArrayView<'_, vortex_array::arrays::Masked>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::scalar_fn::fns::between::BetweenKernel for vortex_array::arrays::Primitive pub fn vortex_array::arrays::Primitive::between(vortex_array::ArrayView<'_, vortex_array::arrays::Primitive>, &vortex_array::ArrayRef, &vortex_array::ArrayRef, &vortex_array::scalar_fn::fns::between::BetweenOptions, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> @@ -4034,6 +4050,8 @@ pub type vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::Parent = pub fn vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::reduce_parent(&self, vortex_array::ArrayView<'_, vortex_array::arrays::Primitive>, vortex_array::ArrayView<'_, vortex_array::arrays::Masked>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + pub trait vortex_array::arrays::primitive::PrimitiveArrayExt: vortex_array::TypedArrayRef pub fn vortex_array::arrays::primitive::PrimitiveArrayExt::buffer_handle(&self) -> &vortex_array::buffer::BufferHandle @@ -4116,8 +4134,12 @@ pub type vortex_array::arrays::scalar_fn::AnyScalarFn::Match<'a> = vortex_array: pub fn vortex_array::arrays::scalar_fn::AnyScalarFn::matches(&vortex_array::ArrayRef) -> bool +pub fn vortex_array::arrays::scalar_fn::AnyScalarFn::matches_parent(&vortex_array::ParentRef<'_>) -> bool + pub fn vortex_array::arrays::scalar_fn::AnyScalarFn::try_match(&vortex_array::ArrayRef) -> core::option::Option +pub fn vortex_array::arrays::scalar_fn::AnyScalarFn::try_match_parent<'a>(&vortex_array::ParentRef<'a>) -> core::option::Option + pub struct vortex_array::arrays::scalar_fn::ExactScalarFn(_) impl core::default::Default for vortex_array::arrays::scalar_fn::ExactScalarFn @@ -4134,8 +4156,12 @@ pub type vortex_array::arrays::scalar_fn::ExactScalarFn::Match<'a> = vortex_a pub fn vortex_array::arrays::scalar_fn::ExactScalarFn::matches(&vortex_array::ArrayRef) -> bool +pub fn vortex_array::arrays::scalar_fn::ExactScalarFn::matches_parent(&vortex_array::ParentRef<'_>) -> bool + pub fn vortex_array::arrays::scalar_fn::ExactScalarFn::try_match(&vortex_array::ArrayRef) -> core::option::Option +pub fn vortex_array::arrays::scalar_fn::ExactScalarFn::try_match_parent<'a>(&vortex_array::ParentRef<'a>) -> core::option::Option + pub struct vortex_array::arrays::scalar_fn::ScalarFn impl core::clone::Clone for vortex_array::arrays::scalar_fn::ScalarFn @@ -4182,7 +4208,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFn::nchildren(vortex_array::ArrayV pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::scalar_fn::ScalarFn::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -4304,7 +4330,7 @@ pub fn vortex_array::arrays::Shared::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Shared::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Shared::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Shared::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Shared::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -4416,7 +4442,7 @@ pub fn vortex_array::arrays::slice::Slice::nchildren(vortex_array::ArrayView<'_, pub fn vortex_array::arrays::slice::Slice::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::slice::Slice::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::Slice::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::slice::Slice::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -4508,6 +4534,8 @@ pub type vortex_array::arrays::slice::SliceReduceAdaptor::Parent = vortex_arr pub fn vortex_array::arrays::slice::SliceReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, ::Match, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::SliceReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + pub trait vortex_array::arrays::slice::SliceArrayExt: vortex_array::TypedArrayRef pub fn vortex_array::arrays::slice::SliceArrayExt::child(&self) -> &vortex_array::ArrayRef @@ -4642,7 +4670,7 @@ pub fn vortex_array::arrays::Struct::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Struct::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Struct::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Struct::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -4806,7 +4834,7 @@ pub fn vortex_array::arrays::VarBin::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::VarBin::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBin::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::VarBin::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -5172,7 +5200,7 @@ pub fn vortex_array::arrays::VarBinView::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::VarBinView::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBinView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::VarBinView::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -5358,7 +5386,7 @@ pub fn vortex_array::arrays::Variant::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Variant::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Variant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Variant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Variant::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -5426,7 +5454,7 @@ pub fn vortex_array::arrays::Bool::nchildren(vortex_array::ArrayView<'_, Self>) pub fn vortex_array::arrays::Bool::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Bool::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Bool::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Bool::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -5456,6 +5484,8 @@ pub type vortex_array::arrays::bool::BoolMaskedValidityRule::Parent = vortex_arr pub fn vortex_array::arrays::bool::BoolMaskedValidityRule::reduce_parent(&self, vortex_array::ArrayView<'_, vortex_array::arrays::Bool>, vortex_array::ArrayView<'_, vortex_array::arrays::Masked>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::bool::BoolMaskedValidityRule::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::scalar_fn::fns::cast::CastKernel for vortex_array::arrays::Bool pub fn vortex_array::arrays::Bool::cast(vortex_array::ArrayView<'_, vortex_array::arrays::Bool>, &vortex_array::dtype::DType, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> @@ -5518,7 +5548,7 @@ pub fn vortex_array::arrays::Chunked::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Chunked::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Chunked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Chunked::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -5608,7 +5638,7 @@ pub fn vortex_array::arrays::Constant::nchildren(vortex_array::ArrayView<'_, Sel pub fn vortex_array::arrays::Constant::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Constant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Constant::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -5694,7 +5724,7 @@ pub fn vortex_array::arrays::Decimal::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Decimal::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Decimal::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Decimal::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -5720,6 +5750,8 @@ pub type vortex_array::arrays::decimal::DecimalMaskedValidityRule::Parent = vort pub fn vortex_array::arrays::decimal::DecimalMaskedValidityRule::reduce_parent(&self, vortex_array::ArrayView<'_, vortex_array::arrays::Decimal>, vortex_array::ArrayView<'_, vortex_array::arrays::Masked>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::decimal::DecimalMaskedValidityRule::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::scalar_fn::fns::between::BetweenKernel for vortex_array::arrays::Decimal pub fn vortex_array::arrays::Decimal::between(vortex_array::ArrayView<'_, vortex_array::arrays::Decimal>, &vortex_array::ArrayRef, &vortex_array::ArrayRef, &vortex_array::scalar_fn::fns::between::BetweenOptions, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> @@ -5786,7 +5818,7 @@ pub fn vortex_array::arrays::dict::Dict::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::dict::Dict::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::dict::Dict::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::dict::Dict::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -5876,7 +5908,7 @@ pub fn vortex_array::arrays::Extension::nchildren(vortex_array::ArrayView<'_, Se pub fn vortex_array::arrays::Extension::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Extension::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Extension::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -5958,7 +5990,7 @@ pub fn vortex_array::arrays::Filter::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Filter::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Filter::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Filter::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Filter::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -6016,7 +6048,7 @@ pub fn vortex_array::arrays::FixedSizeList::nchildren(vortex_array::ArrayView<'_ pub fn vortex_array::arrays::FixedSizeList::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::FixedSizeList::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::FixedSizeList::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -6094,7 +6126,7 @@ pub fn vortex_array::arrays::List::nchildren(vortex_array::ArrayView<'_, Self>) pub fn vortex_array::arrays::List::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::List::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::List::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -6176,7 +6208,7 @@ pub fn vortex_array::arrays::ListView::nchildren(vortex_array::ArrayView<'_, Sel pub fn vortex_array::arrays::ListView::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::ListView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::ListView::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -6258,7 +6290,7 @@ pub fn vortex_array::arrays::Masked::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Masked::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Masked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Masked::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -6336,7 +6368,7 @@ pub fn vortex_array::arrays::null::Null::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::null::Null::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::null::Null::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::null::Null::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -6418,7 +6450,7 @@ pub fn vortex_array::arrays::patched::Patched::nchildren(vortex_array::ArrayView pub fn vortex_array::arrays::patched::Patched::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::patched::Patched::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::patched::Patched::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::patched::Patched::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -6492,7 +6524,7 @@ pub fn vortex_array::arrays::Primitive::nchildren(vortex_array::ArrayView<'_, Se pub fn vortex_array::arrays::Primitive::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Primitive::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Primitive::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -6518,6 +6550,8 @@ pub type vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::Parent = pub fn vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::reduce_parent(&self, vortex_array::ArrayView<'_, vortex_array::arrays::Primitive>, vortex_array::ArrayView<'_, vortex_array::arrays::Masked>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::scalar_fn::fns::between::BetweenKernel for vortex_array::arrays::Primitive pub fn vortex_array::arrays::Primitive::between(vortex_array::ArrayView<'_, vortex_array::arrays::Primitive>, &vortex_array::ArrayRef, &vortex_array::ArrayRef, &vortex_array::scalar_fn::fns::between::BetweenOptions, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> @@ -6584,7 +6618,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFn::nchildren(vortex_array::ArrayV pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::scalar_fn::ScalarFn::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -6642,7 +6676,7 @@ pub fn vortex_array::arrays::Shared::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Shared::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Shared::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Shared::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Shared::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -6700,7 +6734,7 @@ pub fn vortex_array::arrays::slice::Slice::nchildren(vortex_array::ArrayView<'_, pub fn vortex_array::arrays::slice::Slice::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::slice::Slice::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::Slice::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::slice::Slice::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -6762,7 +6796,7 @@ pub fn vortex_array::arrays::Struct::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Struct::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Struct::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Struct::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -6848,7 +6882,7 @@ pub fn vortex_array::arrays::VarBin::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::VarBin::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBin::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::VarBin::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -6934,7 +6968,7 @@ pub fn vortex_array::arrays::VarBinView::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::VarBinView::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBinView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::VarBinView::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -7016,7 +7050,7 @@ pub fn vortex_array::arrays::Variant::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Variant::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Variant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Variant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Variant::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -13394,64 +13428,96 @@ pub type vortex_array::matcher::AnyArray::Match<'a> = &'a vortex_array::ArrayRef pub fn vortex_array::matcher::AnyArray::matches(&vortex_array::ArrayRef) -> bool +pub fn vortex_array::matcher::AnyArray::matches_parent(&vortex_array::ParentRef<'_>) -> bool + pub fn vortex_array::matcher::AnyArray::try_match(&vortex_array::ArrayRef) -> core::option::Option +pub fn vortex_array::matcher::AnyArray::try_match_parent<'a>(&vortex_array::ParentRef<'a>) -> core::option::Option + pub trait vortex_array::matcher::Matcher pub type vortex_array::matcher::Matcher::Match<'a> pub fn vortex_array::matcher::Matcher::matches(&vortex_array::ArrayRef) -> bool +pub fn vortex_array::matcher::Matcher::matches_parent(&vortex_array::ParentRef<'_>) -> bool + pub fn vortex_array::matcher::Matcher::try_match<'a>(&'a vortex_array::ArrayRef) -> core::option::Option +pub fn vortex_array::matcher::Matcher::try_match_parent<'a>(&vortex_array::ParentRef<'a>) -> core::option::Option + impl vortex_array::matcher::Matcher for vortex_array::AnyCanonical pub type vortex_array::AnyCanonical::Match<'a> = vortex_array::CanonicalView<'a> pub fn vortex_array::AnyCanonical::matches(&vortex_array::ArrayRef) -> bool +pub fn vortex_array::AnyCanonical::matches_parent(&vortex_array::ParentRef<'_>) -> bool + pub fn vortex_array::AnyCanonical::try_match<'a>(&'a vortex_array::ArrayRef) -> core::option::Option +pub fn vortex_array::AnyCanonical::try_match_parent<'a>(&vortex_array::ParentRef<'a>) -> core::option::Option + impl vortex_array::matcher::Matcher for vortex_array::AnyColumnar pub type vortex_array::AnyColumnar::Match<'a> = vortex_array::ColumnarView<'a> pub fn vortex_array::AnyColumnar::matches(&vortex_array::ArrayRef) -> bool +pub fn vortex_array::AnyColumnar::matches_parent(&vortex_array::ParentRef<'_>) -> bool + pub fn vortex_array::AnyColumnar::try_match<'a>(&'a vortex_array::ArrayRef) -> core::option::Option +pub fn vortex_array::AnyColumnar::try_match_parent<'a>(&vortex_array::ParentRef<'a>) -> core::option::Option + impl vortex_array::matcher::Matcher for vortex_array::arrays::scalar_fn::AnyScalarFn pub type vortex_array::arrays::scalar_fn::AnyScalarFn::Match<'a> = vortex_array::ArrayView<'a, vortex_array::arrays::scalar_fn::ScalarFn> pub fn vortex_array::arrays::scalar_fn::AnyScalarFn::matches(&vortex_array::ArrayRef) -> bool +pub fn vortex_array::arrays::scalar_fn::AnyScalarFn::matches_parent(&vortex_array::ParentRef<'_>) -> bool + pub fn vortex_array::arrays::scalar_fn::AnyScalarFn::try_match(&vortex_array::ArrayRef) -> core::option::Option +pub fn vortex_array::arrays::scalar_fn::AnyScalarFn::try_match_parent<'a>(&vortex_array::ParentRef<'a>) -> core::option::Option + impl vortex_array::matcher::Matcher for vortex_array::matcher::AnyArray pub type vortex_array::matcher::AnyArray::Match<'a> = &'a vortex_array::ArrayRef pub fn vortex_array::matcher::AnyArray::matches(&vortex_array::ArrayRef) -> bool +pub fn vortex_array::matcher::AnyArray::matches_parent(&vortex_array::ParentRef<'_>) -> bool + pub fn vortex_array::matcher::AnyArray::try_match(&vortex_array::ArrayRef) -> core::option::Option +pub fn vortex_array::matcher::AnyArray::try_match_parent<'a>(&vortex_array::ParentRef<'a>) -> core::option::Option + impl vortex_array::matcher::Matcher for vortex_array::arrays::scalar_fn::ExactScalarFn pub type vortex_array::arrays::scalar_fn::ExactScalarFn::Match<'a> = vortex_array::arrays::scalar_fn::ScalarFnArrayView<'a, F> pub fn vortex_array::arrays::scalar_fn::ExactScalarFn::matches(&vortex_array::ArrayRef) -> bool +pub fn vortex_array::arrays::scalar_fn::ExactScalarFn::matches_parent(&vortex_array::ParentRef<'_>) -> bool + pub fn vortex_array::arrays::scalar_fn::ExactScalarFn::try_match(&vortex_array::ArrayRef) -> core::option::Option +pub fn vortex_array::arrays::scalar_fn::ExactScalarFn::try_match_parent<'a>(&vortex_array::ParentRef<'a>) -> core::option::Option + impl vortex_array::matcher::Matcher for V pub type V::Match<'a> = vortex_array::ArrayView<'a, V> pub fn V::matches(&vortex_array::ArrayRef) -> bool +pub fn V::matches_parent(&vortex_array::ParentRef<'_>) -> bool + pub fn V::try_match<'a>(&'a vortex_array::ArrayRef) -> core::option::Option> +pub fn V::try_match_parent<'a>(&vortex_array::ParentRef<'a>) -> core::option::Option + pub mod vortex_array::memory pub struct vortex_array::memory::DefaultHostAllocator @@ -13612,7 +13678,7 @@ impl vortex_array::optimizer::kernels::ArrayKerne pub fn S::kernels(&self) -> vortex_session::Ref<'_, vortex_array::optimizer::kernels::ArrayKernels> -pub type vortex_array::optimizer::kernels::ReduceParentFn = fn(&vortex_array::ArrayRef, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub type vortex_array::optimizer::kernels::ReduceParentFn = fn(&vortex_array::ArrayRef, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub mod vortex_array::optimizer::rules @@ -13620,9 +13686,9 @@ pub struct vortex_array::optimizer::rules::ParentReduceRuleAdapter impl> vortex_array::optimizer::rules::DynArrayParentReduceRule for vortex_array::optimizer::rules::ParentReduceRuleAdapter -pub fn vortex_array::optimizer::rules::ParentReduceRuleAdapter::matches(&self, &vortex_array::ArrayRef) -> bool +pub fn vortex_array::optimizer::rules::ParentReduceRuleAdapter::matches(&self, &vortex_array::ParentRef<'_>) -> bool -pub fn vortex_array::optimizer::rules::ParentReduceRuleAdapter::reduce_parent(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::optimizer::rules::ParentReduceRuleAdapter::reduce_parent(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> impl> core::fmt::Debug for vortex_array::optimizer::rules::ParentReduceRuleAdapter @@ -13632,7 +13698,7 @@ pub struct vortex_array::optimizer::rules::ParentRuleSet vortex_array::optimizer::rules::ParentRuleSet -pub fn vortex_array::optimizer::rules::ParentRuleSet::evaluate(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::optimizer::rules::ParentRuleSet::evaluate(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub const fn vortex_array::optimizer::rules::ParentRuleSet::lift>(&'static R) -> &'static dyn vortex_array::optimizer::rules::DynArrayParentReduceRule @@ -13652,105 +13718,135 @@ pub type vortex_array::optimizer::rules::ArrayParentReduceRule::Parent: vortex_a pub fn vortex_array::optimizer::rules::ArrayParentReduceRule::reduce_parent(&self, vortex_array::ArrayView<'_, V>, ::Match, usize) -> vortex_error::VortexResult> +pub fn vortex_array::optimizer::rules::ArrayParentReduceRule::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::bool::BoolMaskedValidityRule pub type vortex_array::arrays::bool::BoolMaskedValidityRule::Parent = vortex_array::arrays::Masked pub fn vortex_array::arrays::bool::BoolMaskedValidityRule::reduce_parent(&self, vortex_array::ArrayView<'_, vortex_array::arrays::Bool>, vortex_array::ArrayView<'_, vortex_array::arrays::Masked>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::bool::BoolMaskedValidityRule::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::decimal::DecimalMaskedValidityRule pub type vortex_array::arrays::decimal::DecimalMaskedValidityRule::Parent = vortex_array::arrays::Masked pub fn vortex_array::arrays::decimal::DecimalMaskedValidityRule::reduce_parent(&self, vortex_array::ArrayView<'_, vortex_array::arrays::Decimal>, vortex_array::ArrayView<'_, vortex_array::arrays::Masked>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::decimal::DecimalMaskedValidityRule::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::primitive::PrimitiveMaskedValidityRule pub type vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::Parent = vortex_array::arrays::Masked pub fn vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::reduce_parent(&self, vortex_array::ArrayView<'_, vortex_array::arrays::Primitive>, vortex_array::ArrayView<'_, vortex_array::arrays::Masked>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::dict::TakeReduceAdaptor where V: vortex_array::arrays::dict::TakeReduce pub type vortex_array::arrays::dict::TakeReduceAdaptor::Parent = vortex_array::arrays::dict::Dict pub fn vortex_array::arrays::dict::TakeReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::ArrayView<'_, vortex_array::arrays::dict::Dict>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::TakeReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::filter::FilterReduceAdaptor where V: vortex_array::arrays::filter::FilterReduce pub type vortex_array::arrays::filter::FilterReduceAdaptor::Parent = vortex_array::arrays::Filter pub fn vortex_array::arrays::filter::FilterReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::ArrayView<'_, vortex_array::arrays::Filter>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::filter::FilterReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::slice::SliceReduceAdaptor where V: vortex_array::arrays::slice::SliceReduce pub type vortex_array::arrays::slice::SliceReduceAdaptor::Parent = vortex_array::arrays::slice::Slice pub fn vortex_array::arrays::slice::SliceReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, ::Match, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::SliceReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::between::BetweenReduceAdaptor where V: vortex_array::scalar_fn::fns::between::BetweenReduce pub type vortex_array::scalar_fn::fns::between::BetweenReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn pub fn vortex_array::scalar_fn::fns::between::BetweenReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::between::Between>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::between::BetweenReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::cast::CastReduceAdaptor where V: vortex_array::scalar_fn::fns::cast::CastReduce pub type vortex_array::scalar_fn::fns::cast::CastReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn pub fn vortex_array::scalar_fn::fns::cast::CastReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::cast::Cast>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::cast::CastReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::fill_null::FillNullReduceAdaptor where V: vortex_array::scalar_fn::fns::fill_null::FillNullReduce pub type vortex_array::scalar_fn::fns::fill_null::FillNullReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn pub fn vortex_array::scalar_fn::fns::fill_null::FillNullReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::fill_null::FillNull>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::fill_null::FillNullReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::like::LikeReduceAdaptor where V: vortex_array::scalar_fn::fns::like::LikeReduce pub type vortex_array::scalar_fn::fns::like::LikeReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn pub fn vortex_array::scalar_fn::fns::like::LikeReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::like::Like>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::like::LikeReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduceAdaptor where V: vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduce pub type vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::list_contains::ListContains>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor where V: vortex_array::scalar_fn::fns::mask::MaskReduce pub type vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn pub fn vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::mask::Mask>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::not::NotReduceAdaptor where V: vortex_array::scalar_fn::fns::not::NotReduce pub type vortex_array::scalar_fn::fns::not::NotReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn pub fn vortex_array::scalar_fn::fns::not::NotReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::not::Not>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::not::NotReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor where V: vortex_array::scalar_fn::fns::zip::ZipReduce pub type vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn pub fn vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::zip::Zip>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + pub trait vortex_array::optimizer::rules::ArrayReduceRule: core::fmt::Debug + core::marker::Send + core::marker::Sync + 'static pub fn vortex_array::optimizer::rules::ArrayReduceRule::reduce(&self, vortex_array::ArrayView<'_, V>) -> vortex_error::VortexResult> pub trait vortex_array::optimizer::rules::DynArrayParentReduceRule: core::fmt::Debug + core::marker::Send + core::marker::Sync -pub fn vortex_array::optimizer::rules::DynArrayParentReduceRule::matches(&self, &vortex_array::ArrayRef) -> bool +pub fn vortex_array::optimizer::rules::DynArrayParentReduceRule::matches(&self, &vortex_array::ParentRef<'_>) -> bool -pub fn vortex_array::optimizer::rules::DynArrayParentReduceRule::reduce_parent(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::optimizer::rules::DynArrayParentReduceRule::reduce_parent(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> impl> vortex_array::optimizer::rules::DynArrayParentReduceRule for vortex_array::optimizer::rules::ParentReduceRuleAdapter -pub fn vortex_array::optimizer::rules::ParentReduceRuleAdapter::matches(&self, &vortex_array::ArrayRef) -> bool +pub fn vortex_array::optimizer::rules::ParentReduceRuleAdapter::matches(&self, &vortex_array::ParentRef<'_>) -> bool -pub fn vortex_array::optimizer::rules::ParentReduceRuleAdapter::reduce_parent(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::optimizer::rules::ParentReduceRuleAdapter::reduce_parent(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub trait vortex_array::optimizer::ArrayOptimizer @@ -15944,6 +16040,8 @@ pub type vortex_array::scalar_fn::fns::between::BetweenReduceAdaptor::Parent pub fn vortex_array::scalar_fn::fns::between::BetweenReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::between::Between>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::between::BetweenReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + pub trait vortex_array::scalar_fn::fns::between::BetweenKernel: vortex_array::VTable pub fn vortex_array::scalar_fn::fns::between::BetweenKernel::between(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, &vortex_array::ArrayRef, &vortex_array::scalar_fn::fns::between::BetweenOptions, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> @@ -16214,6 +16312,8 @@ pub type vortex_array::scalar_fn::fns::cast::CastReduceAdaptor::Parent = vort pub fn vortex_array::scalar_fn::fns::cast::CastReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::cast::Cast>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::cast::CastReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + pub trait vortex_array::scalar_fn::fns::cast::CastKernel: vortex_array::VTable pub fn vortex_array::scalar_fn::fns::cast::CastKernel::cast(vortex_array::ArrayView<'_, Self>, &vortex_array::dtype::DType, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> @@ -16474,6 +16574,8 @@ pub type vortex_array::scalar_fn::fns::fill_null::FillNullReduceAdaptor::Pare pub fn vortex_array::scalar_fn::fns::fill_null::FillNullReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::fill_null::FillNull>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::fill_null::FillNullReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + pub trait vortex_array::scalar_fn::fns::fill_null::FillNullKernel: vortex_array::VTable pub fn vortex_array::scalar_fn::fns::fill_null::FillNullKernel::fill_null(vortex_array::ArrayView<'_, Self>, &vortex_array::scalar::Scalar, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> @@ -16758,6 +16860,8 @@ pub type vortex_array::scalar_fn::fns::like::LikeReduceAdaptor::Parent = vort pub fn vortex_array::scalar_fn::fns::like::LikeReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::like::Like>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::like::LikeReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + pub trait vortex_array::scalar_fn::fns::like::LikeKernel: vortex_array::VTable pub fn vortex_array::scalar_fn::fns::like::LikeKernel::like(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, vortex_array::scalar_fn::fns::like::LikeOptions, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> @@ -16848,6 +16952,8 @@ pub type vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduceA pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::list_contains::ListContains>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + pub trait vortex_array::scalar_fn::fns::list_contains::ListContainsElementKernel: vortex_array::VTable pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementKernel::list_contains(&vortex_array::ArrayRef, vortex_array::ArrayView<'_, Self>, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> @@ -16980,6 +17086,8 @@ pub type vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor::Parent = vort pub fn vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::mask::Mask>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + pub trait vortex_array::scalar_fn::fns::mask::MaskKernel: vortex_array::VTable pub fn vortex_array::scalar_fn::fns::mask::MaskKernel::mask(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> @@ -17204,6 +17312,8 @@ pub type vortex_array::scalar_fn::fns::not::NotReduceAdaptor::Parent = vortex pub fn vortex_array::scalar_fn::fns::not::NotReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::not::Not>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::not::NotReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + pub trait vortex_array::scalar_fn::fns::not::NotKernel: vortex_array::VTable pub fn vortex_array::scalar_fn::fns::not::NotKernel::invert(vortex_array::ArrayView<'_, Self>, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> @@ -17668,6 +17778,8 @@ pub type vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor::Parent = vortex pub fn vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor::reduce_parent(&self, vortex_array::ArrayView<'_, V>, vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::zip::Zip>, usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor::reduce_parent_ref(&self, vortex_array::ArrayView<'_, V>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> + pub trait vortex_array::scalar_fn::fns::zip::ZipKernel: vortex_array::VTable pub fn vortex_array::scalar_fn::fns::zip::ZipKernel::zip(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, &vortex_array::ArrayRef, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> @@ -19814,7 +19926,7 @@ pub fn vortex_array::vtable::ArrayVTable::nchildren(vortex_array::ArrayView<'_, pub fn vortex_array::vtable::ArrayVTable::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::vtable::ArrayVTable::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::vtable::ArrayVTable::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::vtable::ArrayVTable::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -19854,7 +19966,7 @@ pub fn vortex_array::arrays::Bool::nchildren(vortex_array::ArrayView<'_, Self>) pub fn vortex_array::arrays::Bool::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Bool::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Bool::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Bool::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -19894,7 +20006,7 @@ pub fn vortex_array::arrays::Chunked::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Chunked::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Chunked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Chunked::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -19934,7 +20046,7 @@ pub fn vortex_array::arrays::Constant::nchildren(vortex_array::ArrayView<'_, Sel pub fn vortex_array::arrays::Constant::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Constant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Constant::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -19974,7 +20086,7 @@ pub fn vortex_array::arrays::Decimal::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Decimal::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Decimal::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Decimal::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20014,7 +20126,7 @@ pub fn vortex_array::arrays::Extension::nchildren(vortex_array::ArrayView<'_, Se pub fn vortex_array::arrays::Extension::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Extension::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Extension::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20054,7 +20166,7 @@ pub fn vortex_array::arrays::Filter::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Filter::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Filter::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Filter::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Filter::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20094,7 +20206,7 @@ pub fn vortex_array::arrays::FixedSizeList::nchildren(vortex_array::ArrayView<'_ pub fn vortex_array::arrays::FixedSizeList::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::FixedSizeList::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::FixedSizeList::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20134,7 +20246,7 @@ pub fn vortex_array::arrays::List::nchildren(vortex_array::ArrayView<'_, Self>) pub fn vortex_array::arrays::List::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::List::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::List::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20174,7 +20286,7 @@ pub fn vortex_array::arrays::ListView::nchildren(vortex_array::ArrayView<'_, Sel pub fn vortex_array::arrays::ListView::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::ListView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::ListView::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20214,7 +20326,7 @@ pub fn vortex_array::arrays::Masked::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Masked::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Masked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Masked::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20254,7 +20366,7 @@ pub fn vortex_array::arrays::Primitive::nchildren(vortex_array::ArrayView<'_, Se pub fn vortex_array::arrays::Primitive::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Primitive::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Primitive::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20294,7 +20406,7 @@ pub fn vortex_array::arrays::Shared::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Shared::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Shared::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Shared::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Shared::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20334,7 +20446,7 @@ pub fn vortex_array::arrays::Struct::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Struct::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Struct::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Struct::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20374,7 +20486,7 @@ pub fn vortex_array::arrays::VarBin::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::VarBin::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBin::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::VarBin::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20414,7 +20526,7 @@ pub fn vortex_array::arrays::VarBinView::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::VarBinView::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBinView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::VarBinView::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20454,7 +20566,7 @@ pub fn vortex_array::arrays::Variant::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Variant::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Variant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Variant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Variant::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20494,7 +20606,7 @@ pub fn vortex_array::arrays::dict::Dict::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::dict::Dict::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::dict::Dict::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::dict::Dict::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20534,7 +20646,7 @@ pub fn vortex_array::arrays::null::Null::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::null::Null::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::null::Null::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::null::Null::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20574,7 +20686,7 @@ pub fn vortex_array::arrays::patched::Patched::nchildren(vortex_array::ArrayView pub fn vortex_array::arrays::patched::Patched::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::patched::Patched::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::patched::Patched::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::patched::Patched::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20614,7 +20726,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFn::nchildren(vortex_array::ArrayV pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::scalar_fn::ScalarFn::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20654,7 +20766,7 @@ pub fn vortex_array::arrays::slice::Slice::nchildren(vortex_array::ArrayView<'_, pub fn vortex_array::arrays::slice::Slice::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::slice::Slice::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::Slice::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::slice::Slice::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20786,7 +20898,7 @@ pub fn vortex_array::vtable::VTable::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::vtable::VTable::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::vtable::VTable::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::vtable::VTable::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::vtable::VTable::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20826,7 +20938,7 @@ pub fn vortex_array::arrays::Bool::nchildren(vortex_array::ArrayView<'_, Self>) pub fn vortex_array::arrays::Bool::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Bool::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Bool::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Bool::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20866,7 +20978,7 @@ pub fn vortex_array::arrays::Chunked::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Chunked::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Chunked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Chunked::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20906,7 +21018,7 @@ pub fn vortex_array::arrays::Constant::nchildren(vortex_array::ArrayView<'_, Sel pub fn vortex_array::arrays::Constant::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Constant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Constant::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20946,7 +21058,7 @@ pub fn vortex_array::arrays::Decimal::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Decimal::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Decimal::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Decimal::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -20986,7 +21098,7 @@ pub fn vortex_array::arrays::Extension::nchildren(vortex_array::ArrayView<'_, Se pub fn vortex_array::arrays::Extension::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Extension::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Extension::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21026,7 +21138,7 @@ pub fn vortex_array::arrays::Filter::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Filter::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Filter::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Filter::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Filter::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21066,7 +21178,7 @@ pub fn vortex_array::arrays::FixedSizeList::nchildren(vortex_array::ArrayView<'_ pub fn vortex_array::arrays::FixedSizeList::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::FixedSizeList::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::FixedSizeList::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21106,7 +21218,7 @@ pub fn vortex_array::arrays::List::nchildren(vortex_array::ArrayView<'_, Self>) pub fn vortex_array::arrays::List::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::List::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::List::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21146,7 +21258,7 @@ pub fn vortex_array::arrays::ListView::nchildren(vortex_array::ArrayView<'_, Sel pub fn vortex_array::arrays::ListView::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::ListView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::ListView::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21186,7 +21298,7 @@ pub fn vortex_array::arrays::Masked::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Masked::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Masked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Masked::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21226,7 +21338,7 @@ pub fn vortex_array::arrays::Primitive::nchildren(vortex_array::ArrayView<'_, Se pub fn vortex_array::arrays::Primitive::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Primitive::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Primitive::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21266,7 +21378,7 @@ pub fn vortex_array::arrays::Shared::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Shared::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Shared::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Shared::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Shared::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21306,7 +21418,7 @@ pub fn vortex_array::arrays::Struct::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Struct::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Struct::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Struct::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21346,7 +21458,7 @@ pub fn vortex_array::arrays::VarBin::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::VarBin::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBin::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::VarBin::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21386,7 +21498,7 @@ pub fn vortex_array::arrays::VarBinView::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::VarBinView::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBinView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::VarBinView::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21426,7 +21538,7 @@ pub fn vortex_array::arrays::Variant::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Variant::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Variant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Variant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Variant::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21466,7 +21578,7 @@ pub fn vortex_array::arrays::dict::Dict::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::dict::Dict::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::dict::Dict::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::dict::Dict::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21506,7 +21618,7 @@ pub fn vortex_array::arrays::null::Null::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::null::Null::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::null::Null::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::null::Null::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21546,7 +21658,7 @@ pub fn vortex_array::arrays::patched::Patched::nchildren(vortex_array::ArrayView pub fn vortex_array::arrays::patched::Patched::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::patched::Patched::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::patched::Patched::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::patched::Patched::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21586,7 +21698,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFn::nchildren(vortex_array::ArrayV pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::scalar_fn::ScalarFn::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21626,7 +21738,7 @@ pub fn vortex_array::arrays::slice::Slice::nchildren(vortex_array::ArrayView<'_, pub fn vortex_array::arrays::slice::Slice::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::slice::Slice::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::Slice::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::slice::Slice::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -21988,8 +22100,12 @@ pub type vortex_array::AnyCanonical::Match<'a> = vortex_array::CanonicalView<'a> pub fn vortex_array::AnyCanonical::matches(&vortex_array::ArrayRef) -> bool +pub fn vortex_array::AnyCanonical::matches_parent(&vortex_array::ParentRef<'_>) -> bool + pub fn vortex_array::AnyCanonical::try_match<'a>(&'a vortex_array::ArrayRef) -> core::option::Option +pub fn vortex_array::AnyCanonical::try_match_parent<'a>(&vortex_array::ParentRef<'a>) -> core::option::Option + pub struct vortex_array::AnyColumnar impl vortex_array::matcher::Matcher for vortex_array::AnyColumnar @@ -21998,8 +22114,12 @@ pub type vortex_array::AnyColumnar::Match<'a> = vortex_array::ColumnarView<'a> pub fn vortex_array::AnyColumnar::matches(&vortex_array::ArrayRef) -> bool +pub fn vortex_array::AnyColumnar::matches_parent(&vortex_array::ParentRef<'_>) -> bool + pub fn vortex_array::AnyColumnar::try_match<'a>(&'a vortex_array::ArrayRef) -> core::option::Option +pub fn vortex_array::AnyColumnar::try_match_parent<'a>(&vortex_array::ParentRef<'a>) -> core::option::Option + pub struct vortex_array::Array impl vortex_array::Array @@ -22072,8 +22192,12 @@ impl vortex_array::Array pub fn vortex_array::Array::new(vortex_array::ArrayRef, vortex_mask::Mask) -> Self +pub fn vortex_array::Array::new_parts(vortex_array::ArrayRef, vortex_mask::Mask) -> vortex_array::ArrayParts + pub fn vortex_array::Array::try_new(vortex_array::ArrayRef, vortex_mask::Mask) -> vortex_error::VortexResult +pub fn vortex_array::Array::try_new_parts(vortex_array::ArrayRef, vortex_mask::Mask) -> vortex_error::VortexResult> + impl vortex_array::Array pub fn vortex_array::Array::into_data_parts(self) -> vortex_array::arrays::fixed_size_list::FixedSizeListDataParts @@ -22266,6 +22390,8 @@ pub unsafe fn vortex_array::Array::set_all_val pub fn vortex_array::Array::try_new(vortex_array::ArrayRef, vortex_array::ArrayRef) -> vortex_error::VortexResult +pub fn vortex_array::Array::try_new_parts(vortex_array::ArrayRef, vortex_array::ArrayRef) -> vortex_error::VortexResult> + impl vortex_array::Array pub fn vortex_array::Array::new(usize) -> Self @@ -22278,8 +22404,12 @@ impl vortex_array::Array pub fn vortex_array::Array::new(vortex_array::ArrayRef, core::ops::range::Range) -> Self +pub fn vortex_array::Array::new_parts(vortex_array::ArrayRef, core::ops::range::Range) -> vortex_array::ArrayParts + pub fn vortex_array::Array::try_new(vortex_array::ArrayRef, core::ops::range::Range) -> vortex_error::VortexResult +pub fn vortex_array::Array::try_new_parts(vortex_array::ArrayRef, core::ops::range::Range) -> vortex_error::VortexResult> + impl vortex_array::Array pub fn vortex_array::Array::all_invalid(&self, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22470,8 +22600,14 @@ pub vortex_array::ArrayParts::vtable: V impl vortex_array::ArrayParts +pub fn vortex_array::ArrayParts::into_array(self) -> vortex_array::ArrayRef + pub fn vortex_array::ArrayParts::new(V, vortex_array::dtype::DType, usize, ::ArrayData) -> Self +pub fn vortex_array::ArrayParts::optimize(&self) -> vortex_error::VortexResult> + +pub fn vortex_array::ArrayParts::optimize_ctx(&self, &vortex_session::VortexSession) -> vortex_error::VortexResult> + pub fn vortex_array::ArrayParts::with_slots(self, alloc::vec::Vec>) -> Self pub struct vortex_array::ArrayRef(_) @@ -22554,7 +22690,7 @@ pub fn vortex_array::ArrayRef::nth_child(&self, usize) -> core::option::Option vortex_error::VortexResult> -pub fn vortex_array::ArrayRef::reduce_parent(&self, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::ArrayRef::reduce_parent(&self, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::ArrayRef::scalar_at(&self, usize) -> vortex_error::VortexResult @@ -22914,6 +23050,10 @@ pub fn vortex_array::ArrayRef::index_len(&self) -> usize pub fn vortex_array::ArrayRef::index_lt(&self, usize, &V) -> vortex_error::VortexResult +impl<'a> core::convert::From<&'a vortex_array::ArrayRef> for vortex_array::ParentRef<'a> + +pub fn vortex_array::ParentRef<'a>::from(&'a vortex_array::ArrayRef) -> Self + impl vortex_array::arrow::FromArrowArray<&arrow_array::array::list_view_array::GenericListViewArray> for vortex_array::ArrayRef pub fn vortex_array::ArrayRef::from_arrow(&arrow_array::array::list_view_array::GenericListViewArray, bool) -> vortex_error::VortexResult @@ -23128,6 +23268,76 @@ impl vortex_array::OperationsVTable for vortex_array pub fn vortex_array::NotSupported::scalar_at(vortex_array::ArrayView<'_, V>, usize, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub struct vortex_array::ParentRef<'a> + +impl<'a> vortex_array::ParentRef<'a> + +pub fn vortex_array::ParentRef<'a>::array_ref(&self) -> core::option::Option<&'a vortex_array::ArrayRef> + +pub fn vortex_array::ParentRef<'a>::dtype(&self) -> &'a vortex_array::dtype::DType + +pub fn vortex_array::ParentRef<'a>::encoding_id(&self) -> vortex_array::ArrayId + +pub fn vortex_array::ParentRef<'a>::from_array_ref(&'a vortex_array::ArrayRef) -> Self + +pub fn vortex_array::ParentRef<'a>::from_parts(&'a vortex_array::ArrayParts) -> Self + +pub fn vortex_array::ParentRef<'a>::into_array_ref(self) -> core::option::Option + +pub fn vortex_array::ParentRef<'a>::is_empty(&self) -> bool + +pub fn vortex_array::ParentRef<'a>::len(&self) -> usize + +pub fn vortex_array::ParentRef<'a>::slots(&self) -> &'a [core::option::Option] + +pub fn vortex_array::ParentRef<'a>::try_array_view(&self) -> core::option::Option> + +pub fn vortex_array::ParentRef<'a>::try_view(&self) -> core::option::Option> + +impl core::fmt::Debug for vortex_array::ParentRef<'_> + +pub fn vortex_array::ParentRef<'_>::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result + +impl<'a> core::clone::Clone for vortex_array::ParentRef<'a> + +pub fn vortex_array::ParentRef<'a>::clone(&self) -> vortex_array::ParentRef<'a> + +impl<'a> core::convert::From<&'a vortex_array::ArrayRef> for vortex_array::ParentRef<'a> + +pub fn vortex_array::ParentRef<'a>::from(&'a vortex_array::ArrayRef) -> Self + +impl<'a> core::marker::Copy for vortex_array::ParentRef<'a> + +pub struct vortex_array::ParentView<'a, V: vortex_array::VTable> + +impl<'a, V: vortex_array::VTable> vortex_array::ParentView<'a, V> + +pub fn vortex_array::ParentView<'a, V>::data(&self) -> &'a ::ArrayData + +pub fn vortex_array::ParentView<'a, V>::dtype(&self) -> &'a vortex_array::dtype::DType + +pub fn vortex_array::ParentView<'a, V>::is_empty(&self) -> bool + +pub fn vortex_array::ParentView<'a, V>::len(&self) -> usize + +pub fn vortex_array::ParentView<'a, V>::slots(&self) -> &'a [core::option::Option] + +impl core::clone::Clone for vortex_array::ParentView<'_, V> + +pub fn vortex_array::ParentView<'_, V>::clone(&self) -> Self + +impl core::fmt::Debug for vortex_array::ParentView<'_, V> + +pub fn vortex_array::ParentView<'_, V>::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result + +impl core::marker::Copy for vortex_array::ParentView<'_, V> + +impl core::ops::deref::Deref for vortex_array::ParentView<'_, V> + +pub type vortex_array::ParentView<'_, V>::Target = ::ArrayData + +pub fn vortex_array::ParentView<'_, V>::deref(&self) -> &::ArrayData + pub struct vortex_array::ProstMetadata(pub M) impl core::fmt::Debug for vortex_array::ProstMetadata @@ -23486,7 +23696,7 @@ pub fn vortex_array::ArrayVTable::nchildren(vortex_array::ArrayView<'_, Self>) - pub fn vortex_array::ArrayVTable::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::ArrayVTable::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::ArrayVTable::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::ArrayVTable::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -23526,7 +23736,7 @@ pub fn vortex_array::arrays::Bool::nchildren(vortex_array::ArrayView<'_, Self>) pub fn vortex_array::arrays::Bool::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Bool::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Bool::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Bool::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -23566,7 +23776,7 @@ pub fn vortex_array::arrays::Chunked::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Chunked::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Chunked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Chunked::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -23606,7 +23816,7 @@ pub fn vortex_array::arrays::Constant::nchildren(vortex_array::ArrayView<'_, Sel pub fn vortex_array::arrays::Constant::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Constant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Constant::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -23646,7 +23856,7 @@ pub fn vortex_array::arrays::Decimal::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Decimal::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Decimal::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Decimal::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -23686,7 +23896,7 @@ pub fn vortex_array::arrays::Extension::nchildren(vortex_array::ArrayView<'_, Se pub fn vortex_array::arrays::Extension::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Extension::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Extension::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -23726,7 +23936,7 @@ pub fn vortex_array::arrays::Filter::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Filter::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Filter::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Filter::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Filter::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -23766,7 +23976,7 @@ pub fn vortex_array::arrays::FixedSizeList::nchildren(vortex_array::ArrayView<'_ pub fn vortex_array::arrays::FixedSizeList::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::FixedSizeList::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::FixedSizeList::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -23806,7 +24016,7 @@ pub fn vortex_array::arrays::List::nchildren(vortex_array::ArrayView<'_, Self>) pub fn vortex_array::arrays::List::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::List::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::List::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -23846,7 +24056,7 @@ pub fn vortex_array::arrays::ListView::nchildren(vortex_array::ArrayView<'_, Sel pub fn vortex_array::arrays::ListView::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::ListView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::ListView::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -23886,7 +24096,7 @@ pub fn vortex_array::arrays::Masked::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Masked::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Masked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Masked::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -23926,7 +24136,7 @@ pub fn vortex_array::arrays::Primitive::nchildren(vortex_array::ArrayView<'_, Se pub fn vortex_array::arrays::Primitive::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Primitive::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Primitive::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -23966,7 +24176,7 @@ pub fn vortex_array::arrays::Shared::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Shared::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Shared::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Shared::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Shared::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24006,7 +24216,7 @@ pub fn vortex_array::arrays::Struct::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Struct::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Struct::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Struct::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24046,7 +24256,7 @@ pub fn vortex_array::arrays::VarBin::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::VarBin::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBin::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::VarBin::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24086,7 +24296,7 @@ pub fn vortex_array::arrays::VarBinView::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::VarBinView::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBinView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::VarBinView::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24126,7 +24336,7 @@ pub fn vortex_array::arrays::Variant::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Variant::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Variant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Variant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Variant::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24166,7 +24376,7 @@ pub fn vortex_array::arrays::dict::Dict::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::dict::Dict::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::dict::Dict::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::dict::Dict::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24206,7 +24416,7 @@ pub fn vortex_array::arrays::null::Null::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::null::Null::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::null::Null::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::null::Null::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24246,7 +24456,7 @@ pub fn vortex_array::arrays::patched::Patched::nchildren(vortex_array::ArrayView pub fn vortex_array::arrays::patched::Patched::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::patched::Patched::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::patched::Patched::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::patched::Patched::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24286,7 +24496,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFn::nchildren(vortex_array::ArrayV pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::scalar_fn::ScalarFn::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24326,7 +24536,7 @@ pub fn vortex_array::arrays::slice::Slice::nchildren(vortex_array::ArrayView<'_, pub fn vortex_array::arrays::slice::Slice::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::slice::Slice::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::Slice::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::slice::Slice::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24706,7 +24916,7 @@ pub fn vortex_array::VTable::nchildren(vortex_array::ArrayView<'_, Self>) -> usi pub fn vortex_array::VTable::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::VTable::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::VTable::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::VTable::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24746,7 +24956,7 @@ pub fn vortex_array::arrays::Bool::nchildren(vortex_array::ArrayView<'_, Self>) pub fn vortex_array::arrays::Bool::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Bool::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Bool::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Bool::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24786,7 +24996,7 @@ pub fn vortex_array::arrays::Chunked::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Chunked::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Chunked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Chunked::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24826,7 +25036,7 @@ pub fn vortex_array::arrays::Constant::nchildren(vortex_array::ArrayView<'_, Sel pub fn vortex_array::arrays::Constant::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Constant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Constant::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24866,7 +25076,7 @@ pub fn vortex_array::arrays::Decimal::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Decimal::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Decimal::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Decimal::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24906,7 +25116,7 @@ pub fn vortex_array::arrays::Extension::nchildren(vortex_array::ArrayView<'_, Se pub fn vortex_array::arrays::Extension::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Extension::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Extension::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24946,7 +25156,7 @@ pub fn vortex_array::arrays::Filter::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Filter::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Filter::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Filter::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Filter::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -24986,7 +25196,7 @@ pub fn vortex_array::arrays::FixedSizeList::nchildren(vortex_array::ArrayView<'_ pub fn vortex_array::arrays::FixedSizeList::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::FixedSizeList::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::FixedSizeList::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -25026,7 +25236,7 @@ pub fn vortex_array::arrays::List::nchildren(vortex_array::ArrayView<'_, Self>) pub fn vortex_array::arrays::List::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::List::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::List::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -25066,7 +25276,7 @@ pub fn vortex_array::arrays::ListView::nchildren(vortex_array::ArrayView<'_, Sel pub fn vortex_array::arrays::ListView::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::ListView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::ListView::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -25106,7 +25316,7 @@ pub fn vortex_array::arrays::Masked::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Masked::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Masked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Masked::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -25146,7 +25356,7 @@ pub fn vortex_array::arrays::Primitive::nchildren(vortex_array::ArrayView<'_, Se pub fn vortex_array::arrays::Primitive::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Primitive::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Primitive::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -25186,7 +25396,7 @@ pub fn vortex_array::arrays::Shared::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Shared::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Shared::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Shared::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Shared::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -25226,7 +25436,7 @@ pub fn vortex_array::arrays::Struct::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::Struct::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Struct::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Struct::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -25266,7 +25476,7 @@ pub fn vortex_array::arrays::VarBin::nchildren(vortex_array::ArrayView<'_, Self> pub fn vortex_array::arrays::VarBin::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBin::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::VarBin::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -25306,7 +25516,7 @@ pub fn vortex_array::arrays::VarBinView::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::VarBinView::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::VarBinView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::VarBinView::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -25346,7 +25556,7 @@ pub fn vortex_array::arrays::Variant::nchildren(vortex_array::ArrayView<'_, Self pub fn vortex_array::arrays::Variant::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::Variant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Variant::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::Variant::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -25386,7 +25596,7 @@ pub fn vortex_array::arrays::dict::Dict::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::dict::Dict::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::dict::Dict::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::dict::Dict::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -25426,7 +25636,7 @@ pub fn vortex_array::arrays::null::Null::nchildren(vortex_array::ArrayView<'_, S pub fn vortex_array::arrays::null::Null::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::null::Null::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::null::Null::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -25466,7 +25676,7 @@ pub fn vortex_array::arrays::patched::Patched::nchildren(vortex_array::ArrayView pub fn vortex_array::arrays::patched::Patched::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::patched::Patched::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::patched::Patched::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::patched::Patched::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -25506,7 +25716,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFn::nchildren(vortex_array::ArrayV pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::scalar_fn::ScalarFn::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::scalar_fn::ScalarFn::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> @@ -25546,7 +25756,7 @@ pub fn vortex_array::arrays::slice::Slice::nchildren(vortex_array::ArrayView<'_, pub fn vortex_array::arrays::slice::Slice::reduce(vortex_array::ArrayView<'_, Self>) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::slice::Slice::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ArrayRef, usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::Slice::reduce_parent(vortex_array::ArrayView<'_, Self>, &vortex_array::ParentRef<'_>, usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::slice::Slice::serialize(vortex_array::ArrayView<'_, Self>, &vortex_session::VortexSession) -> vortex_error::VortexResult>> diff --git a/vortex-array/src/array/erased.rs b/vortex-array/src/array/erased.rs index 7fe8ec953f8..95f0920e94f 100644 --- a/vortex-array/src/array/erased.rs +++ b/vortex-array/src/array/erased.rs @@ -32,6 +32,7 @@ use crate::aggregate_fn::fns::sum::sum; use crate::array::ArrayId; use crate::array::ArrayInner; use crate::array::DynArray; +use crate::array::ParentRef; use crate::arrays::Bool; use crate::arrays::Constant; use crate::arrays::DictArray; @@ -173,9 +174,11 @@ impl ArrayRef { return Ok(Canonical::empty(self.dtype()).into_array()); } - let sliced = SliceArray::try_new(self.clone(), range)? - .into_array() - .optimize()?; + let parts = SliceArray::try_new_parts(self.clone(), range)?; + let sliced = match parts.optimize()? { + Some(reduced) => reduced, + None => parts.into_array(), + }; // Propagate some stats from the original array to the sliced array. if !sliced.is::() { @@ -200,16 +203,20 @@ impl ArrayRef { /// Wraps the array in a [`FilterArray`] such that it is logically filtered by the given mask. pub fn filter(&self, mask: Mask) -> VortexResult { - FilterArray::try_new(self.clone(), mask)? - .into_array() - .optimize() + let parts = FilterArray::try_new_parts(self.clone(), mask)?; + parts + .optimize()? + .map(Ok) + .unwrap_or_else(|| parts.into_array().optimize()) } /// Wraps the array in a [`DictArray`] such that it is logically taken by the given indices. pub fn take(&self, indices: ArrayRef) -> VortexResult { - DictArray::try_new(indices, self.clone())? - .into_array() - .optimize() + let parts = DictArray::try_new_parts(indices, self.clone())?; + parts + .optimize()? + .map(Ok) + .unwrap_or_else(|| parts.into_array().optimize()) } /// Fetch the scalar at the given index. @@ -545,7 +552,7 @@ impl ArrayRef { pub fn reduce_parent( &self, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { self.0.reduce_parent(self, parent, child_idx) @@ -699,4 +706,13 @@ impl Matcher for V { // # Safety checked by `downcast_ref`. Some(unsafe { ArrayView::new_unchecked(array, &inner.data) }) } + + /// Match by encoding-specific data downcast, so [`ParentRuleSet`] still consults + /// rules whose [`reduce_parent_ref`](crate::optimizer::rules::ArrayParentReduceRule::reduce_parent_ref) + /// override handles stack-allocated parents (whose `array_ref()` is `None`). + /// + /// [`ParentRuleSet`]: crate::optimizer::rules::ParentRuleSet + fn matches_parent(parent: &ParentRef<'_>) -> bool { + parent.try_view::().is_some() + } } diff --git a/vortex-array/src/array/mod.rs b/vortex-array/src/array/mod.rs index 1ade2a5a083..37f871ad31b 100644 --- a/vortex-array/src/array/mod.rs +++ b/vortex-array/src/array/mod.rs @@ -35,6 +35,9 @@ pub use plugin::*; mod foreign; pub(crate) use foreign::*; +mod parent; +pub use parent::*; + mod typed; pub use typed::*; @@ -62,6 +65,12 @@ pub(crate) trait DynArray: 'static + private::Sealed + Send + Sync + Debug { /// Converts an owned array allocation into an owned [`Any`] allocation for downcasting. fn into_any_arc(self: std::sync::Arc) -> std::sync::Arc; + /// Returns the encoding-specific data as a generic [`Any`] reference. + /// + /// Used by [`ParentRef`] so matchers can downcast a parent's data to a concrete + /// `V::ArrayData` without going through `Arc`. + fn data_any(&self) -> &dyn Any; + /// Returns the length of the array. fn len(&self) -> usize; @@ -171,7 +180,7 @@ pub(crate) trait DynArray: 'static + private::Sealed + Send + Sync + Debug { fn reduce_parent( &self, this: &ArrayRef, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult>; @@ -254,6 +263,10 @@ impl DynArray for ArrayInner { self } + fn data_any(&self) -> &dyn Any { + &self.data + } + fn len(&self) -> usize { self.len } @@ -477,7 +490,7 @@ impl DynArray for ArrayInner { fn reduce_parent( &self, this: &ArrayRef, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { let view = unsafe { ArrayView::new_unchecked(this, &self.data) }; diff --git a/vortex-array/src/array/parent.rs b/vortex-array/src/array/parent.rs new file mode 100644 index 00000000000..b185b4f731b --- /dev/null +++ b/vortex-array/src/array/parent.rs @@ -0,0 +1,239 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright the Vortex contributors + +//! Stack-allocatable parent representation used by the `reduce_parent` dispatch chain. +//! +//! [`ParentRef`] either borrows an existing heap-allocated [`ArrayRef`], or borrows the +//! component parts of a parent that lives on the stack (typically inside an [`ArrayParts`] +//! that hasn't been materialized yet). Matchers and parent-reduce rules consume +//! `ParentRef` so that callers can attempt reduction without first allocating an +//! `Arc>`. +//! +//! Both cases expose the same borrowed metadata to rule dispatch. Heap-backed parents +//! also retain the original [`ArrayRef`] for compatibility with existing matchers that +//! still need an array allocation. + +use std::any::Any; +use std::fmt::Debug; +use std::fmt::Formatter; +use std::ops::Deref; + +use crate::ArrayRef; +use crate::array::ArrayId; +use crate::array::ArrayParts; +use crate::array::ArrayView; +use crate::array::VTable; +use crate::dtype::DType; + +/// A parent array, possibly stack-allocated, used by the `reduce_parent` dispatch chain. +/// +/// Optionally holds an `&ArrayRef` when the parent is heap-allocated. The remaining +/// metadata (encoding id, dtype, length, encoding-specific data, slots) is always +/// available so matchers and rule bodies can dispatch without distinguishing the two +/// cases. +#[derive(Clone, Copy)] +pub struct ParentRef<'a> { + inner: ParentRefInner<'a>, + array_ref: Option<&'a ArrayRef>, +} + +/// Borrowed parent metadata shared by heap-backed and stack-backed [`ParentRef`]s. +#[derive(Clone, Copy)] +struct ParentRefInner<'a> { + encoding_id: ArrayId, + dtype: &'a DType, + len: usize, + data: &'a dyn Any, + slots: &'a [Option], +} + +impl<'a> ParentRef<'a> { + /// Build a [`ParentRef`] borrowing a heap-allocated [`ArrayRef`]. + #[inline] + pub fn from_array_ref(array: &'a ArrayRef) -> Self { + let inner = array.inner(); + Self { + array_ref: Some(array), + inner: ParentRefInner { + encoding_id: inner.encoding_id(), + dtype: inner.dtype(), + len: inner.len(), + data: inner.data_any(), + slots: inner.slots(), + }, + } + } + + /// Build a [`ParentRef`] borrowing stack-allocated parts of an array. + #[inline] + pub fn from_parts(parts: &'a ArrayParts) -> Self { + Self { + array_ref: None, + inner: ParentRefInner { + encoding_id: parts.vtable.id(), + dtype: &parts.dtype, + len: parts.len, + data: &parts.data, + slots: &parts.slots, + }, + } + } + + /// Returns the encoding id of the parent. + #[inline] + pub fn encoding_id(&self) -> ArrayId { + self.inner.encoding_id + } + + /// Returns the dtype of the parent. + #[inline] + pub fn dtype(&self) -> &'a DType { + self.inner.dtype + } + + /// Returns the length of the parent. + #[inline] + pub fn len(&self) -> usize { + self.inner.len + } + + /// Returns whether the parent is empty. + #[inline] + pub fn is_empty(&self) -> bool { + self.inner.len == 0 + } + + /// Returns the slots of the parent. + #[inline] + pub fn slots(&self) -> &'a [Option] { + self.inner.slots + } + + /// Returns the underlying [`ArrayRef`] if the parent is heap-allocated. + /// + /// Returns `None` when the parent only exists on the stack as an [`ArrayParts`]. + #[inline] + pub fn array_ref(&self) -> Option<&'a ArrayRef> { + self.array_ref + } + + /// Consume this [`ParentRef`] and return an owned [`ArrayRef`] if the parent is + /// heap-allocated. + /// + /// Clones the underlying `Arc` so the caller takes ownership without holding the + /// borrow that produced this `ParentRef`. Returns `None` when the parent only + /// exists on the stack. + #[inline] + pub fn into_array_ref(self) -> Option { + self.array_ref.cloned() + } + + /// Try to extract a [`ParentView`] for the parent's encoding `V`. + /// + /// Returns `None` if the parent's encoding is not `V`. Works for both heap- + /// and stack-allocated parents. + pub fn try_view(&self) -> Option> { + let data = self.inner.data.downcast_ref::()?; + Some(ParentView { + data, + dtype: self.inner.dtype, + len: self.inner.len, + slots: self.inner.slots, + }) + } + + /// Try to extract an [`ArrayView`] for the parent's encoding `V`. + /// + /// Returns `None` if the parent is not heap-allocated, or if its encoding is not + /// `V`. Used by the default `Matcher::try_match_parent` to keep existing rule + /// bodies (which consume `ArrayView`) working over the new `ParentRef` dispatch. + pub fn try_array_view(&self) -> Option> { + self.array_ref?.as_typed::() + } +} + +impl Debug for ParentRef<'_> { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + f.debug_struct("ParentRef") + .field("encoding", &self.encoding_id()) + .field("dtype", self.dtype()) + .field("len", &self.len()) + .field("heap_backed", &self.array_ref.is_some()) + .finish() + } +} + +impl<'a> From<&'a ArrayRef> for ParentRef<'a> { + fn from(array: &'a ArrayRef) -> Self { + Self::from_array_ref(array) + } +} + +/// A typed view of a parent array, possibly stack-allocated. +/// +/// Provides the same surface as [`ArrayView`] for the parent data: `Deref` to +/// `V::ArrayData`, plus `slots`, `dtype`, and `len` accessors. It does not expose +/// an underlying `&ArrayRef`, since the parent may not have one. +pub struct ParentView<'a, V: VTable> { + data: &'a V::ArrayData, + dtype: &'a DType, + len: usize, + slots: &'a [Option], +} + +impl Copy for ParentView<'_, V> {} + +impl Clone for ParentView<'_, V> { + fn clone(&self) -> Self { + *self + } +} + +impl<'a, V: VTable> ParentView<'a, V> { + /// Returns the encoding-specific data. + #[inline] + pub fn data(&self) -> &'a V::ArrayData { + self.data + } + + /// Returns the dtype of the parent. + #[inline] + pub fn dtype(&self) -> &'a DType { + self.dtype + } + + /// Returns the length of the parent. + #[inline] + pub fn len(&self) -> usize { + self.len + } + + /// Returns whether the parent is empty. + #[inline] + pub fn is_empty(&self) -> bool { + self.len == 0 + } + + /// Returns the parent's slots. + #[inline] + pub fn slots(&self) -> &'a [Option] { + self.slots + } +} + +impl Deref for ParentView<'_, V> { + type Target = V::ArrayData; + + fn deref(&self) -> &V::ArrayData { + self.data + } +} + +impl Debug for ParentView<'_, V> { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + f.debug_struct("ParentView") + .field("dtype", self.dtype) + .field("len", &self.len) + .finish() + } +} diff --git a/vortex-array/src/array/typed.rs b/vortex-array/src/array/typed.rs index ffdbcc6f161..1f149b33b5b 100644 --- a/vortex-array/src/array/typed.rs +++ b/vortex-array/src/array/typed.rs @@ -13,6 +13,8 @@ use std::ops::DerefMut; use std::sync::Arc; use vortex_error::VortexResult; +use vortex_session::SessionExt; +use vortex_session::VortexSession; use crate::ArrayRef; use crate::ExecutionCtx; @@ -21,23 +23,41 @@ use crate::LEGACY_SESSION; use crate::VortexSessionExecute; use crate::array::ArrayId; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::dtype::DType; +use crate::optimizer::ArrayOptimizer; +use crate::optimizer::kernels::ArrayKernels; use crate::stats::ArrayStats; use crate::stats::StatsSet; use crate::stats::StatsSetRef; use crate::validity::Validity; -/// Construction parameters for typed arrays. +/// Construction parameters for typed arrays before they are materialized as an [`ArrayRef`]. +/// +/// `ArrayParts` is useful for construction paths that want to try parent-reduction rules before +/// allocating an `ArrayInner`. Normal callers should materialize parts with +/// [`Array::try_from_parts`] so the encoding vtable can validate the dtype, length, data, and +/// child slots. Optimized construction paths may call [`ArrayParts::optimize`] first and then +/// [`ArrayParts::into_array`] when the parts are already known to be valid. pub struct ArrayParts { + /// Encoding vtable for the array. pub vtable: V, + /// Logical dtype of the array. pub dtype: DType, + /// Logical length of the array. pub len: usize, + /// Encoding-specific array data. pub data: V::ArrayData, + /// Child array slots referenced by the encoding. pub slots: Vec>, } impl ArrayParts { + /// Create construction parts without child slots. + /// + /// This does not validate the parts. Validation happens when the parts are passed to + /// [`Array::try_from_parts`]. pub fn new(vtable: V, dtype: DType, len: usize, data: V::ArrayData) -> Self { Self { vtable, @@ -48,10 +68,85 @@ impl ArrayParts { } } + /// Attach child slots to these construction parts. + /// + /// This does not validate the resulting parts. Validation happens when the parts are passed + /// to [`Array::try_from_parts`]. pub fn with_slots(mut self, slots: Vec>) -> Self { self.slots = slots; self } + + /// Try to apply parent-reduction rules to these parts using static rules only. + /// + /// Returns `Some(reduced)` when a `reduce_parent` rule rewrites the parts into a + /// different array, or `None` when no rule applies. The parts are not consumed — + /// if no rule fired, the caller can materialize known-valid parts via + /// [`ArrayParts::into_array`] or use [`Array::try_from_parts`] when validation is + /// still required. + /// + /// This is a construction-side fast path for parent-reduction rules. It does not + /// validate the parts or allocate an `ArrayInner`. + pub fn optimize(&self) -> VortexResult> { + self.optimize_inner(None) + } + + /// Try to apply parent-reduction rules using both static rules and any + /// session-registered [`ArrayKernels`](crate::optimizer::kernels::ArrayKernels). + /// + /// See [`ArrayParts::optimize`] for the static-only variant. + pub fn optimize_ctx(&self, session: &VortexSession) -> VortexResult> { + self.optimize_inner(Some(session)) + } + + fn optimize_inner(&self, session: Option<&VortexSession>) -> VortexResult> { + // Try stack-backed `reduce_parent` so encodings that override + // `ArrayParentReduceRule::reduce_parent_ref` can rewrite the parts without + // allocating a wrapper `Arc>`. When no rule fires, return `None` + // and let the caller decide whether to materialize. + let kernels = session.and_then(|s| s.get_opt::()); + let parent_id = self.vtable.id(); + let parent_ref = ParentRef::from_parts(self); + + for (slot_idx, slot) in self.slots.iter().enumerate() { + let Some(child) = slot else { continue }; + + // Session kernels take precedence over static `PARENT_RULES`, matching + // the existing optimizer's ordering. + if let Some(kernels) = &kernels + && let Some(plugins) = kernels.find_reduce_parent(parent_id, child.encoding_id()) + { + for plugin in plugins.as_ref() { + if let Some(reduced) = plugin(child, &parent_ref, slot_idx)? { + return Ok(Some(cascade(reduced, session)?)); + } + } + } + + if let Some(reduced) = child.reduce_parent(&parent_ref, slot_idx)? { + return Ok(Some(cascade(reduced, session)?)); + } + } + + Ok(None) + } + + /// Materialize already-valid parts into an [`ArrayRef`] without attempting reduction. + /// + /// This intentionally skips vtable validation. Use + /// `Array::::try_from_parts(parts)?.into_array()` when constructing parts from unchecked + /// inputs. + pub fn into_array(self) -> ArrayRef { + unsafe { Array::::from_parts_unchecked(self).into_array() } + } +} + +#[inline] +fn cascade(reduced: ArrayRef, session: Option<&VortexSession>) -> VortexResult { + match session { + Some(s) => reduced.optimize_ctx(s), + None => reduced.optimize(), + } } /// Shared bound for helpers that should work over both owned [`Array`] and borrowed diff --git a/vortex-array/src/array/vtable/mod.rs b/vortex-array/src/array/vtable/mod.rs index 7006c55b076..3194d4aa696 100644 --- a/vortex-array/src/array/vtable/mod.rs +++ b/vortex-array/src/array/vtable/mod.rs @@ -25,6 +25,7 @@ use crate::Canonical; use crate::ExecutionResult; use crate::IntoArray; use crate::Precision; +use crate::array::ParentRef; pub use crate::array::plugin::*; use crate::arrays::ConstantArray; use crate::arrays::constant::Constant; @@ -205,7 +206,7 @@ pub trait VTable: 'static + Clone + Sized + Send + Sync + Debug { /// Attempt to perform a reduction of the parent of this array. fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { _ = (array, parent, child_idx); diff --git a/vortex-array/src/arrays/bool/vtable/mod.rs b/vortex-array/src/arrays/bool/vtable/mod.rs index 270699ec9b0..e3de6004757 100644 --- a/vortex-array/src/arrays/bool/vtable/mod.rs +++ b/vortex-array/src/arrays/bool/vtable/mod.rs @@ -19,6 +19,7 @@ use crate::ExecutionResult; use crate::array::Array; use crate::array::ArrayParts; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::array::child_to_validity; use crate::arrays::bool::BoolData; @@ -184,7 +185,7 @@ impl VTable for Bool { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { 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 046fdea1caa..6ea69f47474 100644 --- a/vortex-array/src/arrays/chunked/vtable/mod.rs +++ b/vortex-array/src/arrays/chunked/vtable/mod.rs @@ -27,6 +27,7 @@ use crate::array::Array; use crate::array::ArrayId; use crate::array::ArrayParts; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::arrays::chunked::ChunkedArrayExt; use crate::arrays::chunked::ChunkedData; @@ -280,7 +281,7 @@ impl VTable for Chunked { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/constant/vtable/mod.rs b/vortex-array/src/arrays/constant/vtable/mod.rs index 7384505d854..ea9a87ff6eb 100644 --- a/vortex-array/src/arrays/constant/vtable/mod.rs +++ b/vortex-array/src/arrays/constant/vtable/mod.rs @@ -23,6 +23,7 @@ use crate::Precision; use crate::array::Array; use crate::array::ArrayId; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::arrays::constant::ConstantData; use crate::arrays::constant::compute::rules::PARENT_RULES; @@ -154,7 +155,7 @@ impl VTable for Constant { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/decimal/vtable/mod.rs b/vortex-array/src/arrays/decimal/vtable/mod.rs index 5360aba5eb0..9049e5e1d38 100644 --- a/vortex-array/src/arrays/decimal/vtable/mod.rs +++ b/vortex-array/src/arrays/decimal/vtable/mod.rs @@ -17,6 +17,7 @@ use crate::ExecutionCtx; use crate::ExecutionResult; use crate::array::Array; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::arrays::decimal::DecimalData; use crate::buffer::BufferHandle; @@ -187,7 +188,7 @@ impl VTable for Decimal { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/dict/array.rs b/vortex-array/src/arrays/dict/array.rs index eafbc9f6642..695143d3db3 100644 --- a/vortex-array/src/arrays/dict/array.rs +++ b/vortex-array/src/arrays/dict/array.rs @@ -231,14 +231,19 @@ impl Array { /// Build a new `DictArray` from its components, `codes` and `values`. pub fn try_new(codes: ArrayRef, values: ArrayRef) -> VortexResult { + Array::try_from_parts(Self::try_new_parts(codes, values)?) + } + + /// Build the [`ArrayParts`] without materializing into an + /// `Arc>`. The parts can then be driven through + /// [`ArrayParts::optimize`] / [`ArrayParts::into_array`]. + pub fn try_new_parts(codes: ArrayRef, values: ArrayRef) -> VortexResult> { let dtype = values .dtype() .union_nullability(codes.dtype().nullability()); let len = codes.len(); let data = DictData::try_new(codes.dtype())?; - Array::try_from_parts( - ArrayParts::new(Dict, dtype, len, data).with_slots(vec![Some(codes), Some(values)]), - ) + Ok(ArrayParts::new(Dict, dtype, len, data).with_slots(vec![Some(codes), Some(values)])) } /// Build a new `DictArray` without validating the codes or values. diff --git a/vortex-array/src/arrays/dict/take.rs b/vortex-array/src/arrays/dict/take.rs index b821af79fac..ec1a4c36bf9 100644 --- a/vortex-array/src/arrays/dict/take.rs +++ b/vortex-array/src/arrays/dict/take.rs @@ -9,9 +9,11 @@ use crate::Canonical; use crate::ExecutionCtx; use crate::IntoArray; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::arrays::ConstantArray; use crate::arrays::dict::DictArraySlotsExt; +use crate::arrays::dict::DictSlotsView; use crate::expr::stats::Precision; use crate::expr::stats::Stat; use crate::expr::stats::StatsProvider; @@ -105,6 +107,30 @@ where } Ok(result) } + + fn reduce_parent_ref( + &self, + array: ArrayView<'_, V>, + parent: &ParentRef<'_>, + child_idx: usize, + ) -> VortexResult> { + // Only handle the values child (index 1), not the codes child (index 0). + if child_idx != 1 { + return Ok(None); + } + let Some(parent) = parent.try_view::() else { + return Ok(None); + }; + let codes = DictSlotsView::from_slots(parent.slots()).codes; + if let Some(result) = precondition::(array, codes) { + return Ok(Some(result)); + } + let result = ::take(array, codes)?; + if let Some(taken) = &result { + propagate_take_stats(array.array(), taken, codes)?; + } + Ok(result) + } } #[derive(Default, Debug)] @@ -170,3 +196,30 @@ pub(crate) fn propagate_take_stats( ) }) } + +#[cfg(test)] +mod tests { + use vortex_error::VortexResult; + use vortex_error::vortex_bail; + + use crate::IntoArray; + use crate::arrays::Constant; + use crate::arrays::ConstantArray; + use crate::arrays::DictArray; + use crate::arrays::PrimitiveArray; + + #[test] + fn reduce_adaptor_handles_stack_backed_dict_parent() -> VortexResult<()> { + let indices = PrimitiveArray::from_iter([0u32, 0, 0]).into_array(); + let values = ConstantArray::new(7i32, 1).into_array(); + let parts = DictArray::try_new_parts(indices, values)?; + + let Some(reduced) = parts.optimize()? else { + vortex_bail!("take reduce adaptor should optimize stack-backed parent"); + }; + + assert!(reduced.is::()); + assert_eq!(reduced.len(), 3); + Ok(()) + } +} diff --git a/vortex-array/src/arrays/dict/vtable/mod.rs b/vortex-array/src/arrays/dict/vtable/mod.rs index 9f64e089bc5..62183545d5e 100644 --- a/vortex-array/src/arrays/dict/vtable/mod.rs +++ b/vortex-array/src/arrays/dict/vtable/mod.rs @@ -29,6 +29,7 @@ use crate::array::Array; use crate::array::ArrayId; use crate::array::ArrayParts; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::arrays::ConstantArray; use crate::arrays::Primitive; @@ -198,7 +199,7 @@ impl VTable for Dict { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/extension/vtable/mod.rs b/vortex-array/src/arrays/extension/vtable/mod.rs index b048c81fff7..78000ad3e4c 100644 --- a/vortex-array/src/arrays/extension/vtable/mod.rs +++ b/vortex-array/src/arrays/extension/vtable/mod.rs @@ -19,6 +19,7 @@ use crate::array::Array; use crate::array::ArrayId; use crate::array::ArrayParts; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::array::ValidityVTableFromChild; use crate::arrays::extension::array::SLOT_NAMES; @@ -190,7 +191,7 @@ impl VTable for Extension { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/filter/array.rs b/vortex-array/src/arrays/filter/array.rs index 8367c8009e9..cc5c8a65c4f 100644 --- a/vortex-array/src/arrays/filter/array.rs +++ b/vortex-array/src/arrays/filter/array.rs @@ -55,7 +55,7 @@ impl FilterData { Self { mask } } - fn try_new(array_len: usize, mask: Mask) -> VortexResult { + pub fn try_new(array_len: usize, mask: Mask) -> VortexResult { vortex_ensure_eq!( array_len, mask.len(), @@ -90,25 +90,30 @@ impl FilterData { impl Array { /// Creates a new `FilterArray`. pub fn new(array: ArrayRef, mask: Mask) -> Self { - let dtype = array.dtype().clone(); - let len = mask.true_count(); - let data = FilterData::new(mask); - unsafe { - Array::from_parts_unchecked( - ArrayParts::new(Filter, dtype, len, data).with_slots(vec![Some(array)]), - ) - } + unsafe { Array::from_parts_unchecked(Self::new_parts(array, mask)) } } /// Constructs a new `FilterArray`. pub fn try_new(array: ArrayRef, mask: Mask) -> VortexResult { + Ok(unsafe { Array::from_parts_unchecked(Self::try_new_parts(array, mask)?) }) + } + + /// Builds the [`ArrayParts`] without materializing into an + /// `Arc>`. The parts can then be driven through + /// [`ArrayParts::optimize`] / [`ArrayParts::into_array`]. + pub fn try_new_parts(array: ArrayRef, mask: Mask) -> VortexResult> { let dtype = array.dtype().clone(); let len = mask.true_count(); let data = FilterData::try_new(array.len(), mask)?; - Ok(unsafe { - Array::from_parts_unchecked( - ArrayParts::new(Filter, dtype, len, data).with_slots(vec![Some(array)]), - ) - }) + Ok(ArrayParts::new(Filter, dtype, len, data).with_slots(vec![Some(array)])) + } + + /// Builds the [`ArrayParts`] without checking that the mask length matches + /// the array length. See [`Self::try_new_parts`] for the checked variant. + pub fn new_parts(array: ArrayRef, mask: Mask) -> ArrayParts { + let dtype = array.dtype().clone(); + let len = mask.true_count(); + let data = FilterData::new(mask); + ArrayParts::new(Filter, dtype, len, data).with_slots(vec![Some(array)]) } } diff --git a/vortex-array/src/arrays/filter/kernel.rs b/vortex-array/src/arrays/filter/kernel.rs index ef8f8671eda..c8c40fb13d8 100644 --- a/vortex-array/src/arrays/filter/kernel.rs +++ b/vortex-array/src/arrays/filter/kernel.rs @@ -16,6 +16,7 @@ use crate::Canonical; use crate::ExecutionCtx; use crate::IntoArray; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::arrays::Filter; use crate::kernel::ExecuteParentKernel; @@ -99,6 +100,22 @@ where } ::filter(array, parent.filter_mask()) } + + fn reduce_parent_ref( + &self, + array: ArrayView<'_, V>, + parent: &ParentRef<'_>, + child_idx: usize, + ) -> VortexResult> { + assert_eq!(child_idx, 0); + let Some(parent) = parent.try_view::() else { + return Ok(None); + }; + if let Some(result) = precondition::(array, parent.filter_mask()) { + return Ok(Some(result)); + } + ::filter(array, parent.filter_mask()) + } } /// Adaptor that wraps a [`FilterKernel`] impl as an [`ExecuteParentKernel`]. @@ -125,3 +142,29 @@ where ::filter(array, parent.filter_mask(), ctx) } } + +#[cfg(test)] +mod tests { + use vortex_error::VortexResult; + use vortex_error::vortex_bail; + use vortex_mask::Mask; + + use crate::IntoArray; + use crate::arrays::Constant; + use crate::arrays::ConstantArray; + use crate::arrays::FilterArray; + + #[test] + fn reduce_adaptor_handles_stack_backed_filter_parent() -> VortexResult<()> { + let child = ConstantArray::new(7i32, 4).into_array(); + let parts = FilterArray::try_new_parts(child, Mask::from_iter([true, false, true, false]))?; + + let Some(reduced) = parts.optimize()? else { + vortex_bail!("filter reduce adaptor should optimize stack-backed parent"); + }; + + assert!(reduced.is::()); + assert_eq!(reduced.len(), 2); + Ok(()) + } +} diff --git a/vortex-array/src/arrays/filter/vtable.rs b/vortex-array/src/arrays/filter/vtable.rs index f6cd88410af..9adfce62f91 100644 --- a/vortex-array/src/arrays/filter/vtable.rs +++ b/vortex-array/src/arrays/filter/vtable.rs @@ -24,6 +24,7 @@ use crate::array::Array; use crate::array::ArrayId; use crate::array::ArrayView; use crate::array::OperationsVTable; +use crate::array::ParentRef; use crate::array::VTable; use crate::array::ValidityVTable; use crate::arrays::filter::FilterArrayExt; @@ -164,7 +165,7 @@ impl VTable for Filter { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) 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 a3724b06fca..34267524ce6 100644 --- a/vortex-array/src/arrays/fixed_size_list/vtable/mod.rs +++ b/vortex-array/src/arrays/fixed_size_list/vtable/mod.rs @@ -22,6 +22,7 @@ use crate::Precision; use crate::array::Array; use crate::array::ArrayId; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::arrays::fixed_size_list::FixedSizeListData; use crate::arrays::fixed_size_list::array::NUM_SLOTS; @@ -79,7 +80,7 @@ impl VTable for FixedSizeList { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/list/vtable/mod.rs b/vortex-array/src/arrays/list/vtable/mod.rs index 38d1959219d..e5671b54772 100644 --- a/vortex-array/src/arrays/list/vtable/mod.rs +++ b/vortex-array/src/arrays/list/vtable/mod.rs @@ -24,6 +24,7 @@ use crate::array::Array; use crate::array::ArrayId; use crate::array::ArrayParts; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::arrays::list::ListArrayExt; use crate::arrays::list::ListData; @@ -85,7 +86,7 @@ impl VTable for List { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/listview/vtable/mod.rs b/vortex-array/src/arrays/listview/vtable/mod.rs index f51fde706a4..292db7b1fcf 100644 --- a/vortex-array/src/arrays/listview/vtable/mod.rs +++ b/vortex-array/src/arrays/listview/vtable/mod.rs @@ -23,6 +23,7 @@ use crate::Precision; use crate::array::Array; use crate::array::ArrayId; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::arrays::listview::ListViewArrayExt; use crate::arrays::listview::ListViewData; @@ -211,7 +212,7 @@ impl VTable for ListView { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/masked/vtable/mod.rs b/vortex-array/src/arrays/masked/vtable/mod.rs index 2ef10ba0082..355d7142591 100644 --- a/vortex-array/src/arrays/masked/vtable/mod.rs +++ b/vortex-array/src/arrays/masked/vtable/mod.rs @@ -26,6 +26,7 @@ use crate::VortexSessionExecute; use crate::array::Array; use crate::array::ArrayId; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::array::validity_to_child; use crate::arrays::ConstantArray; @@ -185,7 +186,7 @@ impl VTable for Masked { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/null/mod.rs b/vortex-array/src/arrays/null/mod.rs index 30f68cecc51..d7edda75aac 100644 --- a/vortex-array/src/arrays/null/mod.rs +++ b/vortex-array/src/arrays/null/mod.rs @@ -16,6 +16,7 @@ use crate::array::ArrayParts; use crate::array::ArrayView; use crate::array::EmptyArrayData; use crate::array::OperationsVTable; +use crate::array::ParentRef; use crate::array::VTable; use crate::array::ValidityVTable; use crate::arrays::null::compute::rules::PARENT_RULES; @@ -100,7 +101,7 @@ impl VTable for Null { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/patched/vtable/mod.rs b/vortex-array/src/arrays/patched/vtable/mod.rs index ad2fc9aadc7..a6e9d2798c4 100644 --- a/vortex-array/src/arrays/patched/vtable/mod.rs +++ b/vortex-array/src/arrays/patched/vtable/mod.rs @@ -29,6 +29,7 @@ use crate::array::Array; use crate::array::ArrayId; use crate::array::ArrayParts; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::array::ValidityChild; use crate::array::ValidityVTableFromChild; @@ -312,7 +313,7 @@ impl VTable for Patched { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/primitive/vtable/mod.rs b/vortex-array/src/arrays/primitive/vtable/mod.rs index cb28f96631e..205f5f3d885 100644 --- a/vortex-array/src/arrays/primitive/vtable/mod.rs +++ b/vortex-array/src/arrays/primitive/vtable/mod.rs @@ -12,6 +12,7 @@ use crate::ExecutionCtx; use crate::ExecutionResult; use crate::array::Array; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::arrays::primitive::PrimitiveData; use crate::buffer::BufferHandle; @@ -186,7 +187,7 @@ impl VTable for Primitive { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/scalar_fn/vtable/mod.rs b/vortex-array/src/arrays/scalar_fn/vtable/mod.rs index 34c472eac07..457990d9e40 100644 --- a/vortex-array/src/arrays/scalar_fn/vtable/mod.rs +++ b/vortex-array/src/arrays/scalar_fn/vtable/mod.rs @@ -25,6 +25,7 @@ use crate::array::Array; use crate::array::ArrayId; use crate::array::ArrayParts; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::arrays::scalar_fn::array::ScalarFnArrayExt; use crate::arrays::scalar_fn::array::ScalarFnData; @@ -158,7 +159,7 @@ impl VTable for ScalarFn { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/slice/array.rs b/vortex-array/src/arrays/slice/array.rs index b1121e2604a..1a7873e0c5a 100644 --- a/vortex-array/src/arrays/slice/array.rs +++ b/vortex-array/src/arrays/slice/array.rs @@ -83,25 +83,30 @@ impl SliceData { impl Array { /// Constructs a new `SliceArray`. pub fn try_new(child: ArrayRef, range: Range) -> VortexResult { + Ok(unsafe { Array::from_parts_unchecked(Self::try_new_parts(child, range)?) }) + } + + /// Constructs a new `SliceArray`. + pub fn new(child: ArrayRef, range: Range) -> Self { + unsafe { Array::from_parts_unchecked(Self::new_parts(child, range)) } + } + + /// Builds the [`ArrayParts`] for a slice without materializing into an + /// `Arc>`. The parts can then be driven through + /// [`ArrayParts::optimize`] / [`ArrayParts::into_array`]. + pub fn try_new_parts(child: ArrayRef, range: Range) -> VortexResult> { let len = range.len(); let dtype = child.dtype().clone(); let data = SliceData::try_new(child.len(), range)?; - Ok(unsafe { - Array::from_parts_unchecked( - ArrayParts::new(Slice, dtype, len, data).with_slots(vec![Some(child)]), - ) - }) + Ok(ArrayParts::new(Slice, dtype, len, data).with_slots(vec![Some(child)])) } - /// Constructs a new `SliceArray`. - pub fn new(child: ArrayRef, range: Range) -> Self { + /// Builds the [`ArrayParts`] without bounds-checking the range. See + /// [`Self::try_new_parts`] for the checked variant. + pub fn new_parts(child: ArrayRef, range: Range) -> ArrayParts { let len = range.len(); let dtype = child.dtype().clone(); let data = SliceData::new(range); - unsafe { - Array::from_parts_unchecked( - ArrayParts::new(Slice, dtype, len, data).with_slots(vec![Some(child)]), - ) - } + ArrayParts::new(Slice, dtype, len, data).with_slots(vec![Some(child)]) } } diff --git a/vortex-array/src/arrays/slice/mod.rs b/vortex-array/src/arrays/slice/mod.rs index 8eec9d85310..3fb8e94659b 100644 --- a/vortex-array/src/arrays/slice/mod.rs +++ b/vortex-array/src/arrays/slice/mod.rs @@ -26,6 +26,7 @@ use crate::Canonical; use crate::ExecutionCtx; use crate::IntoArray; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::kernel::ExecuteParentKernel; use crate::matcher::Matcher; @@ -96,6 +97,25 @@ where } ::slice(array, parent.range.clone()) } + + /// Override the default `try_match_parent`-driven dispatch so a `SliceArray` parent + /// living on the stack inside an [`ArrayParts`](crate::array::ArrayParts) can drive + /// reduction without first allocating an `Arc>`. + fn reduce_parent_ref( + &self, + array: ArrayView<'_, V>, + parent: &ParentRef<'_>, + child_idx: usize, + ) -> VortexResult> { + assert_eq!(child_idx, 0); + let Some(parent_view) = parent.try_view::() else { + return Ok(None); + }; + if let Some(result) = precondition::(array, &parent_view.range) { + return Ok(Some(result)); + } + ::slice(array, parent_view.range.clone()) + } } /// Adaptor that wraps a [`SliceKernel`] impl as an [`ExecuteParentKernel`]. diff --git a/vortex-array/src/arrays/slice/vtable.rs b/vortex-array/src/arrays/slice/vtable.rs index 56dbcbcd915..9b08254e211 100644 --- a/vortex-array/src/arrays/slice/vtable.rs +++ b/vortex-array/src/arrays/slice/vtable.rs @@ -24,6 +24,7 @@ use crate::array::Array; use crate::array::ArrayId; use crate::array::ArrayView; use crate::array::OperationsVTable; +use crate::array::ParentRef; use crate::array::VTable; use crate::array::ValidityVTable; use crate::arrays::slice::SliceArrayExt; @@ -153,7 +154,7 @@ impl VTable for Slice { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/struct_/vtable/mod.rs b/vortex-array/src/arrays/struct_/vtable/mod.rs index 6a7a2cd8dd8..df3603b7cfc 100644 --- a/vortex-array/src/arrays/struct_/vtable/mod.rs +++ b/vortex-array/src/arrays/struct_/vtable/mod.rs @@ -15,6 +15,7 @@ use crate::ExecutionResult; use crate::array::Array; use crate::array::ArrayView; use crate::array::EmptyArrayData; +use crate::array::ParentRef; use crate::array::VTable; use crate::array::child_to_validity; use crate::arrays::struct_::array::FIELDS_OFFSET; @@ -189,7 +190,7 @@ impl VTable for Struct { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/varbin/vtable/mod.rs b/vortex-array/src/arrays/varbin/vtable/mod.rs index b72ac5eaa48..db67e610787 100644 --- a/vortex-array/src/arrays/varbin/vtable/mod.rs +++ b/vortex-array/src/arrays/varbin/vtable/mod.rs @@ -18,6 +18,7 @@ use crate::IntoArray; use crate::array::Array; use crate::array::ArrayId; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::arrays::varbin::VarBinArrayExt; use crate::arrays::varbin::VarBinData; @@ -175,7 +176,7 @@ impl VTable for VarBin { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/arrays/varbinview/vtable/mod.rs b/vortex-array/src/arrays/varbinview/vtable/mod.rs index 3827549744c..1fec3a15bea 100644 --- a/vortex-array/src/arrays/varbinview/vtable/mod.rs +++ b/vortex-array/src/arrays/varbinview/vtable/mod.rs @@ -22,6 +22,7 @@ use crate::Precision; use crate::array::Array; use crate::array::ArrayId; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::arrays::varbinview::BinaryView; use crate::arrays::varbinview::VarBinViewData; @@ -211,7 +212,7 @@ impl VTable for VarBinView { fn reduce_parent( array: ArrayView<'_, Self>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { PARENT_RULES.evaluate(array, parent, child_idx) diff --git a/vortex-array/src/executor.rs b/vortex-array/src/executor.rs index 694fd25c3c6..d2994ef57bc 100644 --- a/vortex-array/src/executor.rs +++ b/vortex-array/src/executor.rs @@ -29,6 +29,7 @@ use crate::ArrayRef; use crate::Canonical; use crate::IntoArray; use crate::array::ArrayId; +use crate::array::ParentRef; use crate::builders::ArrayBuilder; use crate::builders::builder_with_capacity_in; use crate::dtype::DType; @@ -403,9 +404,10 @@ impl Executable for ArrayRef { return Ok(reduced); } + let parent_ref = ParentRef::from_array_ref(&array); for (slot_idx, slot) in array.slots().iter().enumerate() { let Some(child) = slot else { continue }; - if let Some(reduced_parent) = child.reduce_parent(&array, slot_idx)? { + if let Some(reduced_parent) = child.reduce_parent(&parent_ref, slot_idx)? { ctx.log(format_args!( "reduce_parent: slot[{}]({}) rewrote {} -> {}", slot_idx, diff --git a/vortex-array/src/matcher.rs b/vortex-array/src/matcher.rs index b7d82fa3866..78f79e8745f 100644 --- a/vortex-array/src/matcher.rs +++ b/vortex-array/src/matcher.rs @@ -2,18 +2,71 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors use crate::ArrayRef; +use crate::array::ParentRef; /// Trait for matching array types. pub trait Matcher { type Match<'a>; - /// Check if the given array matches this matcher type + /// Check if the given array matches this matcher type. + /// + /// # Deprecated + /// + /// Prefer [`Matcher::matches_parent`]. This method only sees a heap-allocated + /// [`ArrayRef`]; stack-allocated parents constructed by [`ArrayParts::optimize`] + /// flow through `matches_parent` instead. + /// + /// Existing implementations can stay; new matchers should override + /// [`Matcher::matches_parent`] (and [`Matcher::try_match_parent`]) directly so they + /// participate in the stack-backed `reduce_parent` dispatch. + /// + /// [`ArrayParts::optimize`]: crate::array::ArrayParts::optimize fn matches(array: &ArrayRef) -> bool { Self::try_match(array).is_some() } /// Try to match the given array, returning the matched view type if successful. + /// + /// # Deprecated + /// + /// Prefer [`Matcher::try_match_parent`]. This method only sees a heap-allocated + /// [`ArrayRef`]; stack-allocated parents constructed by [`ArrayParts::optimize`] + /// flow through `try_match_parent` instead. + /// + /// Existing implementations can stay; new matchers should override + /// [`Matcher::try_match_parent`] directly so they participate in the stack-backed + /// `reduce_parent` dispatch. + /// + /// [`ArrayParts::optimize`]: crate::array::ArrayParts::optimize fn try_match<'a>(array: &'a ArrayRef) -> Option>; + + /// Try to match a [`ParentRef`]. + /// + /// The default delegates to [`Matcher::try_match`] when the parent is heap-allocated + /// and returns `None` otherwise. Implementations may override this to recognize + /// stack-allocated parents — typically by downcasting `parent` via + /// [`ParentRef::try_view`]. + /// + /// # Stability + /// + /// **Unstable.** This is part of the [`ArrayParts::optimize`]-driven stack-backed + /// dispatch path and the signature is expected to change as more rules migrate to + /// `ParentRef`. Implementations should treat this as opt-in for now. + /// + /// [`ArrayParts::optimize`]: crate::array::ArrayParts::optimize + fn try_match_parent<'a>(parent: &ParentRef<'a>) -> Option> { + Self::try_match(parent.array_ref()?) + } + + /// Check if the given parent matches this matcher type. + /// + /// # Stability + /// + /// **Unstable.** Counterpart to [`Matcher::try_match_parent`]; expect changes as the + /// stack-backed `reduce_parent` dispatch lands more migrations. + fn matches_parent(parent: &ParentRef<'_>) -> bool { + Self::try_match_parent(parent).is_some() + } } /// Matches any array type (wildcard matcher) diff --git a/vortex-array/src/optimizer/kernels.rs b/vortex-array/src/optimizer/kernels.rs index a31192f8016..ae1c34f4b62 100644 --- a/vortex-array/src/optimizer/kernels.rs +++ b/vortex-array/src/optimizer/kernels.rs @@ -32,6 +32,7 @@ use vortex_utils::aliases::DefaultHashBuilder; use vortex_utils::aliases::hash_map::HashMap; use crate::ArrayRef; +use crate::array::ParentRef; /// Shared hasher used to combine `(outer, child, FnKind)` tuples into [`FnRegistry`] keys. static FN_HASHER: LazyLock = LazyLock::new(DefaultHashBuilder::default); @@ -44,8 +45,11 @@ static FN_HASHER: LazyLock = LazyLock::new(DefaultHashBuilde /// /// Implementations must preserve the parent's logical length and dtype, matching the invariant /// required of static parent-reduce rules. -pub type ReduceParentFn = - fn(child: &ArrayRef, parent: &ArrayRef, child_idx: usize) -> VortexResult>; +pub type ReduceParentFn = fn( + child: &ArrayRef, + parent: &ParentRef<'_>, + child_idx: usize, +) -> VortexResult>; /// Session-scoped registry of optimizer kernel functions. #[derive(Debug, Default)] diff --git a/vortex-array/src/optimizer/mod.rs b/vortex-array/src/optimizer/mod.rs index f991dbb2c1d..24ffbbe3ad6 100644 --- a/vortex-array/src/optimizer/mod.rs +++ b/vortex-array/src/optimizer/mod.rs @@ -21,6 +21,7 @@ use vortex_session::SessionExt; use vortex_session::VortexSession; use crate::ArrayRef; +use crate::array::ParentRef; use crate::optimizer::kernels::ArrayKernels; pub mod kernels; @@ -86,6 +87,7 @@ fn try_optimize( // Apply parent reduction rules to each slot in the context of the current array. // Its important to take all slots here, as `current_array` can change inside the loop. + let parent_ref = ParentRef::from_array_ref(¤t_array); for (slot_idx, slot) in current_array.slots().iter().enumerate() { let Some(child) = slot else { continue }; @@ -95,7 +97,7 @@ fn try_optimize( array_ref.find_reduce_parent(current_array.encoding_id(), child.encoding_id()) { for plugin in plugins.as_ref() { - if let Some(new_array) = plugin(child, ¤t_array, slot_idx)? { + if let Some(new_array) = plugin(child, &parent_ref, slot_idx)? { current_array = new_array; any_optimizations = true; continue 'outer; @@ -103,7 +105,7 @@ fn try_optimize( } } - if let Some(new_array) = child.reduce_parent(¤t_array, slot_idx)? { + if let Some(new_array) = child.reduce_parent(&parent_ref, slot_idx)? { // If the parent was replaced, then we attempt to reduce it again. current_array = new_array; any_optimizations = true; diff --git a/vortex-array/src/optimizer/rules.rs b/vortex-array/src/optimizer/rules.rs index e505b21a199..bfc00239cc8 100644 --- a/vortex-array/src/optimizer/rules.rs +++ b/vortex-array/src/optimizer/rules.rs @@ -26,6 +26,7 @@ use vortex_error::VortexResult; use crate::ArrayRef; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::VTable; use crate::matcher::Matcher; @@ -48,6 +49,16 @@ pub trait ArrayReduceRule: Debug + Send + Sync + 'static { /// The child sees the parent's type via the associated `Parent` [`Matcher`] and can return /// a replacement for the parent. This enables optimizations like pushing operations through /// compression layers (e.g., pushing a scalar function into dictionary values). +/// +/// # Migration to `ParentRef` +/// +/// New rules should override [`ArrayParentReduceRule::reduce_parent_ref`] directly so +/// they participate in the stack-backed dispatch driven by +/// [`ArrayParts::optimize`](crate::array::ArrayParts::optimize). The default +/// `reduce_parent_ref` falls through to [`reduce_parent`](Self::reduce_parent) via +/// [`Matcher::try_match_parent`], which only matches heap-allocated parents — so +/// rules that only override `reduce_parent` will still fire on heap-backed parents +/// but will miss the stack-backed fast path. pub trait ArrayParentReduceRule: Debug + Send + Sync + 'static { /// The parent array type this rule matches against. type Parent: Matcher; @@ -58,23 +69,65 @@ pub trait ArrayParentReduceRule: Debug + Send + Sync + 'static { /// - `Ok(Some(new_array))` if the rule applied successfully /// - `Ok(None)` if the rule doesn't apply /// - `Err(e)` if an error occurred + /// + /// # Deprecated + /// + /// Prefer overriding [`ArrayParentReduceRule::reduce_parent_ref`]. This method + /// only sees the parent through [`Matcher::Match`], which for the blanket + /// `impl Matcher for V` is an [`ArrayView`] holding an `&ArrayRef` — + /// in other words it only fires when the parent is heap-allocated. Rules that + /// override `reduce_parent_ref` instead can rewrite stack-allocated parents + /// constructed by [`ArrayParts::optimize`](crate::array::ArrayParts::optimize) + /// without forcing an `Arc>` allocation. + /// + /// Existing implementations can stay; the default `reduce_parent_ref` continues + /// to delegate here for heap-backed parents. fn reduce_parent( &self, array: ArrayView<'_, V>, parent: ::Match<'_>, child_idx: usize, ) -> VortexResult>; + + /// Attempt to rewrite the child given a [`ParentRef`]. + /// + /// This is the dispatch entry point used by [`ParentRuleSet`]. The default + /// implementation extracts the parent's typed view via + /// [`Matcher::try_match_parent`] (which only matches heap-allocated parents) and + /// then delegates to [`reduce_parent`](Self::reduce_parent). + /// + /// Override this when the rule can rewrite a stack-allocated parent, typically by + /// extracting an encoding-specific view via [`ParentRef::try_view`]. Doing so lets + /// callers like [`ArrayParts::optimize`](crate::array::ArrayParts::optimize) avoid + /// the `Arc>` allocation when the rule fires. + /// + /// # Stability + /// + /// **Unstable.** This is the new `ParentRef`-based dispatch entry; the signature + /// and contract are expected to change as more rules migrate off + /// [`reduce_parent`](Self::reduce_parent). Treat overrides as opt-in for now. + fn reduce_parent_ref( + &self, + array: ArrayView<'_, V>, + parent: &ParentRef<'_>, + child_idx: usize, + ) -> VortexResult> { + let Some(parent_view) = ::try_match_parent(parent) else { + return Ok(None); + }; + self.reduce_parent(array, parent_view, child_idx) + } } /// Type-erased version of [`ArrayParentReduceRule`] used for dynamic dispatch within /// [`ParentRuleSet`]. pub trait DynArrayParentReduceRule: Debug + Send + Sync { - fn matches(&self, parent: &ArrayRef) -> bool; + fn matches(&self, parent: &ParentRef<'_>) -> bool; fn reduce_parent( &self, array: ArrayView<'_, V>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult>; } @@ -98,20 +151,17 @@ impl> Debug for ParentReduceRuleAdapter> DynArrayParentReduceRule for ParentReduceRuleAdapter { - fn matches(&self, parent: &ArrayRef) -> bool { - K::Parent::matches(parent) + fn matches(&self, parent: &ParentRef<'_>) -> bool { + K::Parent::matches_parent(parent) } fn reduce_parent( &self, child: ArrayView<'_, V>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { - let Some(parent_view) = K::Parent::try_match(parent) else { - return Ok(None); - }; - self.rule.reduce_parent(child, parent_view, child_idx) + self.rule.reduce_parent_ref(child, parent, child_idx) } } @@ -171,7 +221,7 @@ impl ParentRuleSet { pub fn evaluate( &self, child: ArrayView<'_, V>, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { for rule in self.rules.iter() { diff --git a/vortex-cuda/src/dynamic_dispatch/plan_builder.rs b/vortex-cuda/src/dynamic_dispatch/plan_builder.rs index e887f1ba53f..8b93794c182 100644 --- a/vortex-cuda/src/dynamic_dispatch/plan_builder.rs +++ b/vortex-cuda/src/dynamic_dispatch/plan_builder.rs @@ -10,6 +10,7 @@ use itertools::zip_eq; use tracing::trace; use vortex::array::ArrayRef; use vortex::array::ArrayVTable; +use vortex::array::ParentRef; use vortex::array::arrays::Dict; use vortex::array::arrays::Primitive; use vortex::array::arrays::Slice; @@ -500,7 +501,8 @@ impl FusedPlan { let slice_arr = array.as_::(); let child = slice_arr.child().clone(); - if let Some(reduced) = child.reduce_parent(&array, 0)? { + let parent_ref = ParentRef::from_array_ref(&array); + if let Some(reduced) = child.reduce_parent(&parent_ref, 0)? { return self.walk(reduced, pending_subtrees); }