From 04c7c59fc7c427083db2129fb96716a905fa8fa3 Mon Sep 17 00:00:00 2001 From: Robert Kruszewski Date: Fri, 1 May 2026 09:31:49 -0400 Subject: [PATCH] Introduce ParentRef and ArrayParts::optimize chain `ArrayRef::slice/filter/take` previously allocated a wrapper array (`SliceArray`, `FilterArray`, `DictArray`) and called `.optimize()` on the resulting `ArrayRef`, relying on a `reduce_parent` rule to throw the wrapper away. The wrapper allocation was always paid even when reduction ran in one shot. This change establishes the API surface for moving the wrapper onto the stack: - `ParentRef<'a>`: a parent representation that optionally borrows an `&ArrayRef` and otherwise carries the encoding-specific data, dtype, length, slots, and encoding id directly. `into_array_ref(self)` clones the underlying `Arc` when the parent is heap-backed. - `ParentView<'a, V>`: a typed view of a parent that derefs to `V::ArrayData` without holding an `&ArrayRef`. Used by the upcoming matcher path that accepts stack-allocated parents. - `DynArray::data_any` exposes the encoding-specific data so a matcher can downcast to `V::ArrayData` from a `ParentRef` regardless of whether the parent is heap- or stack-backed. - `ArrayParts::optimize`, `optimize_ctx(session)`, and `into_array`, plus `Optimized` with its own `into_array`. Callers chain `parts.optimize()?.into_array()` so reduction is an explicit, orthogonal step from materialization. - `ArrayRef::slice / filter / take` now build an `ArrayParts` and drive it through the chain. The internals of `ArrayParts::optimize` still materialize before running the existing `reduce_parent` chain, so this PR does not yet remove the `Arc>` allocation. Wiring `ParentRef` through `DynArray::reduce_parent`, `VTable::reduce_parent`, `ParentRuleSet`, `DynArrayParentReduceRule`, `ReduceParentFn`, the `Matcher` API, and the per-encoding rule bodies is the follow-up that delivers the allocation savings. - `cargo build --workspace` - `cargo nextest run -p vortex-array -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-runend -p vortex-zigzag` (all 3078 pass; the 21 skipped are timezone-dependent and unrelated to this change) - `cargo clippy -p vortex-array --all-targets --all-features` - `cargo +nightly fmt --all -- --check` - `./scripts/public-api.sh` Signed-off-by: Robert Kruszewski --- encodings/alp/public-api.lock | 4 +- encodings/alp/src/alp/array.rs | 3 +- encodings/alp/src/alp_rd/array.rs | 3 +- encodings/bytebool/public-api.lock | 2 +- encodings/bytebool/src/array.rs | 3 +- encodings/datetime-parts/public-api.lock | 2 +- encodings/datetime-parts/src/array.rs | 3 +- encodings/decimal-byte-parts/public-api.lock | 2 +- .../src/decimal_byte_parts/mod.rs | 3 +- encodings/fastlanes/public-api.lock | 8 +- .../fastlanes/src/bitpacking/compute/slice.rs | 5 +- .../fastlanes/src/bitpacking/vtable/mod.rs | 3 +- .../src/bitpacking/vtable/operations.rs | 5 +- encodings/fastlanes/src/delta/vtable/mod.rs | 3 +- encodings/fastlanes/src/for/vtable/mod.rs | 3 +- encodings/fastlanes/src/rle/vtable/mod.rs | 3 +- encodings/fsst/public-api.lock | 2 +- encodings/fsst/src/array.rs | 3 +- encodings/pco/public-api.lock | 2 +- encodings/pco/src/array.rs | 3 +- encodings/runend/public-api.lock | 2 +- encodings/runend/src/array.rs | 3 +- encodings/sequence/public-api.lock | 2 +- encodings/sequence/src/array.rs | 3 +- encodings/sparse/public-api.lock | 2 +- encodings/sparse/src/lib.rs | 3 +- encodings/zigzag/public-api.lock | 2 +- encodings/zigzag/src/array.rs | 3 +- encodings/zstd/public-api.lock | 2 +- encodings/zstd/src/array.rs | 3 +- vortex-array/public-api.lock | 490 +++++++++++++----- vortex-array/src/array/erased.rs | 52 +- vortex-array/src/array/mod.rs | 7 +- vortex-array/src/array/parent.rs | 337 ++++++++++++ vortex-array/src/array/typed.rs | 9 + vortex-array/src/array/vtable/mod.rs | 3 +- vortex-array/src/arrays/bool/vtable/mod.rs | 3 +- vortex-array/src/arrays/chunked/vtable/mod.rs | 4 +- .../src/arrays/constant/vtable/mod.rs | 3 +- vortex-array/src/arrays/decimal/vtable/mod.rs | 3 +- vortex-array/src/arrays/dict/array.rs | 44 +- vortex-array/src/arrays/dict/take.rs | 54 ++ vortex-array/src/arrays/dict/vtable/mod.rs | 3 +- .../src/arrays/extension/vtable/mod.rs | 3 +- vortex-array/src/arrays/filter/array.rs | 33 +- vortex-array/src/arrays/filter/kernel.rs | 44 ++ vortex-array/src/arrays/filter/vtable.rs | 4 +- .../src/arrays/fixed_size_list/vtable/mod.rs | 4 +- vortex-array/src/arrays/list/vtable/mod.rs | 4 +- .../src/arrays/listview/vtable/mod.rs | 4 +- vortex-array/src/arrays/masked/vtable/mod.rs | 3 +- vortex-array/src/arrays/null/mod.rs | 3 +- vortex-array/src/arrays/patched/vtable/mod.rs | 3 +- .../src/arrays/primitive/vtable/mod.rs | 3 +- .../src/arrays/scalar_fn/vtable/mod.rs | 27 +- vortex-array/src/arrays/shared/vtable.rs | 1 + vortex-array/src/arrays/slice/array.rs | 29 +- vortex-array/src/arrays/slice/mod.rs | 20 + vortex-array/src/arrays/slice/vtable.rs | 4 +- .../src/arrays/struct_/compute/cast.rs | 8 +- .../src/arrays/struct_/compute/rules.rs | 9 +- vortex-array/src/arrays/struct_/vtable/mod.rs | 4 +- vortex-array/src/arrays/varbin/vtable/mod.rs | 4 +- .../src/arrays/varbinview/vtable/mod.rs | 3 +- vortex-array/src/canonical.rs | 48 +- vortex-array/src/columnar.rs | 11 +- vortex-array/src/executor.rs | 7 +- vortex-array/src/matcher.rs | 35 +- vortex-array/src/optimizer/kernels.rs | 16 +- vortex-array/src/optimizer/mod.rs | 6 +- vortex-array/src/optimizer/rules.rs | 72 ++- .../src/dynamic_dispatch/plan_builder.rs | 4 +- 72 files changed, 1178 insertions(+), 340 deletions(-) create mode 100644 vortex-array/src/array/parent.rs diff --git a/encodings/alp/public-api.lock b/encodings/alp/public-api.lock index ef90ffa0fda..1b5ceef75b7 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 cac93d1d27d..8dd43935644 100644 --- a/encodings/alp/src/alp/array.rs +++ b/encodings/alp/src/alp/array.rs @@ -19,6 +19,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; @@ -183,7 +184,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 099b9e1a3ea..5539d285367 100644 --- a/encodings/alp/src/alp_rd/array.rs +++ b/encodings/alp/src/alp_rd/array.rs @@ -22,6 +22,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; @@ -302,7 +303,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 730db87d7d5..a8f890675f4 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 40da3809d01..28656a6f46d 100644 --- a/encodings/bytebool/src/array.rs +++ b/encodings/bytebool/src/array.rs @@ -17,6 +17,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; @@ -143,7 +144,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 5ec3b13f8a5..23afddc589a 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 e603b1ddfe5..db773010bbf 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; @@ -195,7 +196,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 985172de937..8c41e425d21 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 76349f40910..c6f7f5ded94 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; @@ -156,7 +157,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 4f0ce3df18c..3e01f7509d8 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>> @@ -318,7 +318,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>> @@ -406,7 +406,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>> @@ -512,7 +512,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 c019cccd003..1426795f27f 100644 --- a/encodings/fastlanes/src/bitpacking/compute/slice.rs +++ b/encodings/fastlanes/src/bitpacking/compute/slice.rs @@ -73,6 +73,7 @@ fn slice_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; @@ -87,11 +88,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 912dd4ff44b..4a850bdc343 100644 --- a/encodings/fastlanes/src/bitpacking/vtable/mod.rs +++ b/encodings/fastlanes/src/bitpacking/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::buffer::BufferHandle; use vortex_array::builders::ArrayBuilder; @@ -279,7 +280,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 4c277163719..01540cf210a 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 96b6ec27e0c..88316536c98 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; @@ -112,7 +113,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 899276341de..0a86b30c166 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; @@ -141,7 +142,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 33c0d78fe62..59304d60eb3 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; @@ -123,7 +124,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 44cf663fa39..e42db876d8e 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 617908e94dd..4a6b19f9acf 100644 --- a/encodings/fsst/src/array.rs +++ b/encodings/fsst/src/array.rs @@ -25,6 +25,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; @@ -319,7 +320,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 655ca1d6ecc..1cd2ae6b0c8 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 94db1014c79..47780f7fe43 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; @@ -231,7 +232,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 0f95821ab08..cd64bb7c775 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 943f4881806..e91c290cfa0 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; @@ -166,7 +167,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 f7f0f4650de..30f7c0b0fa4 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 2ee0b22d89c..5c99aea1410 100644 --- a/encodings/sequence/src/array.rs +++ b/encodings/sequence/src/array.rs @@ -18,6 +18,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; @@ -342,7 +343,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 33ec9fc9361..43693a027cf 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 74b137fd1c7..2827044d3f0 100644 --- a/encodings/sparse/src/lib.rs +++ b/encodings/sparse/src/lib.rs @@ -22,6 +22,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; @@ -243,7 +244,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 3bbc2428ad1..af054a31af7 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 26d3bf984e2..d1dad0960d1 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; @@ -138,7 +139,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 43c534a4169..03ad1a172ac 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 b327a6a2a95..6a7823ccef0 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; @@ -244,7 +245,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 8d5cc75c895..4f7fd7fa4e3 100644 --- a/vortex-array/public-api.lock +++ b/vortex-array/public-api.lock @@ -1578,7 +1578,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>> @@ -1608,6 +1608,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> @@ -1674,6 +1676,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 @@ -1752,7 +1756,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>> @@ -1916,7 +1920,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>> @@ -2096,7 +2100,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>> @@ -2122,6 +2126,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> @@ -2222,6 +2228,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 @@ -2316,7 +2324,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>> @@ -2408,7 +2416,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>> @@ -2594,6 +2602,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 @@ -2760,7 +2770,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>> @@ -2858,7 +2868,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>> @@ -2884,6 +2894,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 @@ -2940,6 +2952,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 @@ -3046,7 +3060,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>> @@ -3190,7 +3204,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>> @@ -3370,7 +3384,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>> @@ -3554,7 +3568,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>> @@ -3704,7 +3718,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>> @@ -3790,7 +3804,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>> @@ -4076,7 +4090,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>> @@ -4102,6 +4116,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> @@ -4210,6 +4226,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 @@ -4292,8 +4310,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 @@ -4310,8 +4332,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 @@ -4358,7 +4384,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>> @@ -4480,7 +4506,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>> @@ -4592,7 +4618,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>> @@ -4684,6 +4710,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 @@ -4818,7 +4846,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>> @@ -4974,7 +5002,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>> @@ -5340,7 +5368,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>> @@ -5526,7 +5554,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>> @@ -5594,7 +5622,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>> @@ -5624,6 +5652,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> @@ -5686,7 +5716,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>> @@ -5776,7 +5806,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>> @@ -5862,7 +5892,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>> @@ -5888,6 +5918,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> @@ -5954,7 +5986,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>> @@ -6044,7 +6076,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>> @@ -6126,7 +6158,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>> @@ -6184,7 +6216,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>> @@ -6262,7 +6294,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>> @@ -6344,7 +6376,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>> @@ -6426,7 +6458,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>> @@ -6504,7 +6536,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>> @@ -6586,7 +6618,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>> @@ -6660,7 +6692,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>> @@ -6686,6 +6718,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> @@ -6752,7 +6786,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>> @@ -6810,7 +6844,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>> @@ -6868,7 +6902,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>> @@ -6930,7 +6964,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>> @@ -7008,7 +7042,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>> @@ -7094,7 +7128,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>> @@ -7176,7 +7210,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>> @@ -13554,63 +13588,95 @@ 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(&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(&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(&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::try_match(&vortex_array::ArrayRef) -> core::option::Option> +pub fn V::matches_parent(&vortex_array::ParentRef<'_>) -> bool + +pub fn V::try_match(&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 @@ -13776,9 +13842,9 @@ 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::ExecuteParentFn = fn(&vortex_array::ArrayRef, &vortex_array::ArrayRef, usize, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub type vortex_array::optimizer::kernels::ExecuteParentFn = fn(&vortex_array::ArrayRef, &vortex_array::ParentRef<'_>, usize, &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> -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 @@ -13786,9 +13852,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 @@ -13798,7 +13864,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 @@ -13818,105 +13884,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 @@ -16162,6 +16258,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> @@ -16432,6 +16530,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> @@ -16684,6 +16784,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> @@ -16968,6 +17070,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> @@ -17058,6 +17162,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> @@ -17190,6 +17296,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> @@ -17414,6 +17522,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> @@ -17878,6 +17988,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> @@ -20026,7 +20138,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>> @@ -20066,7 +20178,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>> @@ -20106,7 +20218,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>> @@ -20146,7 +20258,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>> @@ -20186,7 +20298,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>> @@ -20226,7 +20338,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>> @@ -20266,7 +20378,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>> @@ -20306,7 +20418,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>> @@ -20346,7 +20458,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>> @@ -20386,7 +20498,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>> @@ -20426,7 +20538,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>> @@ -20466,7 +20578,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>> @@ -20506,7 +20618,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>> @@ -20546,7 +20658,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>> @@ -20586,7 +20698,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>> @@ -20626,7 +20738,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>> @@ -20666,7 +20778,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>> @@ -20706,7 +20818,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>> @@ -20746,7 +20858,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>> @@ -20786,7 +20898,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>> @@ -20826,7 +20938,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>> @@ -20866,7 +20978,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>> @@ -20998,7 +21110,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>> @@ -21038,7 +21150,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>> @@ -21078,7 +21190,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>> @@ -21118,7 +21230,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>> @@ -21158,7 +21270,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>> @@ -21198,7 +21310,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>> @@ -21238,7 +21350,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>> @@ -21278,7 +21390,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>> @@ -21318,7 +21430,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>> @@ -21358,7 +21470,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>> @@ -21398,7 +21510,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>> @@ -21438,7 +21550,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>> @@ -21478,7 +21590,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>> @@ -21518,7 +21630,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>> @@ -21558,7 +21670,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>> @@ -21598,7 +21710,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>> @@ -21638,7 +21750,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>> @@ -21678,7 +21790,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>> @@ -21718,7 +21830,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>> @@ -21758,7 +21870,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>> @@ -21798,7 +21910,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>> @@ -21838,7 +21950,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>> @@ -22200,8 +22312,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(&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 @@ -22210,8 +22326,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(&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 @@ -22284,8 +22404,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 @@ -22478,6 +22602,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 @@ -22490,8 +22616,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 @@ -22682,6 +22812,8 @@ 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, ::TypedArrayData) -> Self pub fn vortex_array::ArrayParts::with_slots(self, vortex_array::ArraySlots) -> Self @@ -22766,7 +22898,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 @@ -23126,6 +23258,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 @@ -23340,6 +23476,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>::is_empty(&self) -> bool + +pub fn vortex_array::ParentRef<'a>::len(&self) -> usize + +pub fn vortex_array::ParentRef<'a>::optimize(&self) -> vortex_error::VortexResult> + +pub fn vortex_array::ParentRef<'a>::optimize_ctx(&self, &vortex_session::VortexSession) -> vortex_error::VortexResult> + +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 ::TypedArrayData + +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 = ::TypedArrayData + +pub fn vortex_array::ParentView<'_, V>::deref(&self) -> &::TypedArrayData + pub struct vortex_array::ProstMetadata(pub M) impl core::fmt::Debug for vortex_array::ProstMetadata @@ -23698,7 +23904,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>> @@ -23738,7 +23944,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>> @@ -23778,7 +23984,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>> @@ -23818,7 +24024,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>> @@ -23858,7 +24064,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>> @@ -23898,7 +24104,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>> @@ -23938,7 +24144,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>> @@ -23978,7 +24184,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>> @@ -24018,7 +24224,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>> @@ -24058,7 +24264,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>> @@ -24098,7 +24304,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>> @@ -24138,7 +24344,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>> @@ -24178,7 +24384,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>> @@ -24218,7 +24424,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>> @@ -24258,7 +24464,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>> @@ -24298,7 +24504,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>> @@ -24338,7 +24544,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>> @@ -24378,7 +24584,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>> @@ -24418,7 +24624,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>> @@ -24458,7 +24664,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>> @@ -24498,7 +24704,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>> @@ -24538,7 +24744,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>> @@ -24918,7 +25124,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>> @@ -24958,7 +25164,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>> @@ -24998,7 +25204,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>> @@ -25038,7 +25244,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>> @@ -25078,7 +25284,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>> @@ -25118,7 +25324,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>> @@ -25158,7 +25364,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>> @@ -25198,7 +25404,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>> @@ -25238,7 +25444,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>> @@ -25278,7 +25484,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>> @@ -25318,7 +25524,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>> @@ -25358,7 +25564,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>> @@ -25398,7 +25604,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>> @@ -25438,7 +25644,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>> @@ -25478,7 +25684,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>> @@ -25518,7 +25724,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>> @@ -25558,7 +25764,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>> @@ -25598,7 +25804,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>> @@ -25638,7 +25844,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>> @@ -25678,7 +25884,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>> @@ -25718,7 +25924,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>> @@ -25758,7 +25964,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 e5f1f9050ab..ad0d361ccef 100644 --- a/vortex-array/src/array/erased.rs +++ b/vortex-array/src/array/erased.rs @@ -21,6 +21,7 @@ use crate::AnyCanonical; use crate::Array; use crate::ArrayEq; use crate::ArrayHash; +use crate::ArraySlots; use crate::ArrayView; use crate::Canonical; use crate::ExecutionCtx; @@ -33,8 +34,9 @@ use crate::aggregate_fn::fns::sum::sum; use crate::array::ArrayData; use crate::array::ArrayId; use crate::array::ArrayInner; -use crate::array::ArraySlots; +use crate::array::ArrayParts; use crate::array::DynArrayData; +use crate::array::ParentRef; use crate::arrays::Bool; use crate::arrays::Constant; use crate::arrays::DictArray; @@ -94,6 +96,11 @@ impl ArrayRef { &self.0.data } + #[inline(always)] + pub(crate) fn inner(&self) -> &ArrayInner { + &self.0 + } + /// Returns a mutable reference to the inner if this is the sole owner. #[inline(always)] pub(crate) fn inner_mut(&mut self) -> Option<&mut ArrayInner> { @@ -143,6 +150,14 @@ impl ArrayRef { } } +fn optimize_stack_parts(parts: ArrayParts) -> VortexResult { + if let Some(reduced) = ParentRef::from_parts(&parts).optimize()? { + return Ok(reduced); + } + + parts.into_array().optimize() +} + impl Debug for ArrayRef { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { f.debug_struct("Array") @@ -228,9 +243,8 @@ 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 = optimize_stack_parts(parts)?; // Propagate some stats from the original array to the sliced array. if !sliced.is::() { @@ -255,16 +269,14 @@ 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)?; + optimize_stack_parts(parts) } /// 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())?; + optimize_stack_parts(parts) } /// Fetch the scalar at the given index. @@ -402,7 +414,8 @@ impl ArrayRef { /// Returns the array downcast by the given matcher. pub fn as_opt(&self) -> Option> { - M::try_match(self) + let parent = ParentRef::from_array_ref(self); + M::matches_parent(&parent).then(|| M::try_match_parent(&parent))? } /// Returns the array downcast to the given `Array` as an owned typed handle. @@ -596,7 +609,7 @@ impl ArrayRef { pub fn reduce_parent( &self, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult> { self.0.data.reduce_parent(self, parent, child_idx) @@ -739,13 +752,16 @@ impl IntoArray for ArrayRef { impl Matcher for V { type Match<'a> = ArrayView<'a, V>; - fn matches(array: &ArrayRef) -> bool { - array.0.data.as_any().is::>() + fn try_match_parent<'a>(parent: &ParentRef<'a>) -> Option> { + parent.try_array_view::() } - fn try_match(array: &'_ ArrayRef) -> Option> { - let inner = array.0.data.as_any().downcast_ref::>()?; - // # 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.is_encoding::() } } diff --git a/vortex-array/src/array/mod.rs b/vortex-array/src/array/mod.rs index 23ad9499766..2313e78124b 100644 --- a/vortex-array/src/array/mod.rs +++ b/vortex-array/src/array/mod.rs @@ -34,6 +34,9 @@ pub use plugin::*; mod foreign; pub(crate) use foreign::*; +mod parent; +pub use parent::*; + mod typed; pub use typed::*; @@ -148,7 +151,7 @@ pub(crate) trait DynArrayData: 'static + private::Sealed + Send + Sync + Debug { fn reduce_parent( &self, this: &ArrayRef, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ) -> VortexResult>; @@ -410,7 +413,7 @@ impl DynArrayData for ArrayData { 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..3faf00bc64d --- /dev/null +++ b/vortex-array/src/array/parent.rs @@ -0,0 +1,337 @@ +// 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 +//! stack-allocated construction state. The construction-side optimizer can borrow +//! `ArrayParts` before materializing an `ArrayInner`, so matchers and parent-reduce +//! rules 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 vortex_error::VortexResult; +use vortex_session::SessionExt; +use vortex_session::VortexSession; + +use crate::ArrayRef; +use crate::array::ArrayData; +use crate::array::ArrayId; +use crate::array::ArrayParts; +use crate::array::ArrayView; +use crate::array::VTable; +use crate::dtype::DType; +use crate::optimizer::ArrayOptimizer; +use crate::optimizer::kernels::ArrayKernels; + +/// 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> { + encoding_id: ArrayId, + dtype: &'a DType, + len: usize, + data: ParentData<'a>, + slots: &'a [Option], + array_ref: Option<&'a ArrayRef>, +} + +#[derive(Clone, Copy)] +enum ParentData<'a> { + ArrayData(&'a dyn Any), + Parts { + vtable: &'a dyn Any, + data: &'a dyn Any, + }, +} + +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), + encoding_id: inner.encoding_id, + dtype: &inner.dtype, + len: inner.len, + data: ParentData::ArrayData(inner.data.as_any()), + slots: &inner.slots, + } + } + + /// Build a [`ParentRef`] borrowing construction parts before materialization. + #[inline] + pub(crate) fn from_parts(parts: &'a ArrayParts) -> Self { + Self { + array_ref: None, + encoding_id: parts.vtable.id(), + dtype: &parts.dtype, + len: parts.len, + data: ParentData::Parts { + vtable: &parts.vtable, + data: &parts.data, + }, + slots: &parts.slots, + } + } + + /// Try to optimize this parent using static parent-reduction rules. + /// + /// Returns `Some(reduced)` when a parent-reduction rule rewrites the parent, or + /// `None` when no rule applies. This method does not materialize the original + /// parent when no rule fires; callers that own stack construction state should + /// materialize that state themselves. + pub fn optimize(&self) -> VortexResult> { + self.optimize_inner(None) + } + + /// Try to optimize this parent using static rules and session-registered kernels. + /// + /// Session kernels are checked before static parent-reduction rules. + pub fn optimize_ctx(&self, session: &VortexSession) -> VortexResult> { + self.optimize_inner(Some(session)) + } + + fn optimize_inner(&self, session: Option<&VortexSession>) -> VortexResult> { + let kernels = session.and_then(|s| s.get_opt::()); + + 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(self.encoding_id, child.encoding_id()) + { + for plugin in plugins.as_ref() { + if let Some(reduced) = plugin(child, self, slot_idx)? { + return cascade(reduced, session).map(Some); + } + } + } + + if let Some(reduced) = child.reduce_parent(self, slot_idx)? { + return cascade(reduced, session).map(Some); + } + } + + Ok(None) + } + + /// Returns the encoding id of the parent. + #[inline] + pub fn encoding_id(&self) -> ArrayId { + self.encoding_id + } + + /// 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 slots of the parent. + #[inline] + pub fn slots(&self) -> &'a [Option] { + self.slots + } + + /// Returns the underlying [`ArrayRef`] if the parent is heap-allocated. + /// + /// Returns `None` when the parent only exists on the stack. + #[inline] + pub fn array_ref(&self) -> Option<&'a ArrayRef> { + self.array_ref + } + + /// 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.typed_data::()?; + Some(ParentView { + data, + dtype: self.dtype, + len: self.len, + slots: self.slots, + }) + } + + #[inline] + pub(crate) fn is_encoding(&self) -> bool { + match self.data { + ParentData::ArrayData(data) => data.is::>(), + ParentData::Parts { vtable, .. } => vtable.is::(), + } + } + + #[inline] + pub(crate) fn typed_data(&self) -> Option<&'a V::TypedArrayData> { + if !self.is_encoding::() { + return None; + } + + match self.data { + ParentData::ArrayData(data) => data + .downcast_ref::>() + .map(|array_data| &array_data.data), + ParentData::Parts { data, .. } => data.downcast_ref::(), + } + } + + /// 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`. This is useful for matcher implementations whose match type is an + /// `ArrayView` and therefore requires an underlying `ArrayRef`. + 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) + } +} + +#[inline] +fn cascade(reduced: ArrayRef, session: Option<&VortexSession>) -> VortexResult { + match session { + Some(s) => reduced.optimize_ctx(s), + None => reduced.optimize(), + } +} + +/// 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::TypedArrayData, + 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::TypedArrayData { + 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::TypedArrayData; + + fn deref(&self) -> &V::TypedArrayData { + 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() + } +} + +#[cfg(test)] +mod tests { + use vortex_error::VortexResult; + + use super::ParentRef; + use crate::IntoArray; + use crate::arrays::BoolArray; + use crate::arrays::Slice; + use crate::arrays::SliceArray; + + #[test] + fn parts_parent_ref_exposes_parent_view() -> VortexResult<()> { + let child = BoolArray::from_iter([true, false, true]).into_array(); + let parts = SliceArray::try_new_parts(child, 1..3)?; + let parent = ParentRef::from_parts(&parts); + + let view = parent + .try_view::() + .expect("Slice parts should match a Slice parent view"); + + assert_eq!(view.slice_range(), &(1..3)); + assert!(parent.try_array_view::().is_none()); + + Ok(()) + } +} diff --git a/vortex-array/src/array/typed.rs b/vortex-array/src/array/typed.rs index 180f771bc9c..16539e8e6ad 100644 --- a/vortex-array/src/array/typed.rs +++ b/vortex-array/src/array/typed.rs @@ -70,6 +70,15 @@ impl ArrayParts { self.slots = slots; self } + + /// 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() } + } } /// 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 6c85bb79d05..a62fd2bfe62 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 35261fa8d89..9cfa80ad4ca 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 90a5ed8ec02..c4246321acc 100644 --- a/vortex-array/src/arrays/chunked/vtable/mod.rs +++ b/vortex-array/src/arrays/chunked/vtable/mod.rs @@ -28,6 +28,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; @@ -72,6 +73,7 @@ impl VTable for Chunked { type OperationsVTable = Self; type ValidityVTable = Self; + fn id(&self) -> ArrayId { static ID: CachedId = CachedId::new("vortex.chunked"); *ID @@ -281,7 +283,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 c130c28a95a..5ec1e3d9ef4 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 dac24ecd95f..2351137b63a 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 10108191744..291aa549d91 100644 --- a/vortex-array/src/arrays/dict/array.rs +++ b/vortex-array/src/arrays/dict/array.rs @@ -233,12 +233,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`]. The parts can then be optimized through + /// [`ParentRef::optimize`](crate::array::ParentRef::optimize) or materialized + /// directly with [`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( + Ok( ArrayParts::new(Dict, dtype, len, data) .with_slots(smallvec![Some(codes), Some(values)]), ) @@ -293,6 +300,8 @@ impl Array { #[cfg(test)] mod test { + use std::sync::LazyLock; + use rand::RngExt; use rand::SeedableRng; use rand::distr::Distribution; @@ -304,12 +313,10 @@ mod test { use vortex_error::VortexResult; use vortex_error::vortex_panic; use vortex_mask::AllOr; + use vortex_session::VortexSession; use crate::ArrayRef; use crate::IntoArray; - use crate::LEGACY_SESSION; - #[expect(deprecated)] - use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::ChunkedArray; use crate::arrays::DictArray; @@ -321,8 +328,12 @@ mod test { use crate::dtype::Nullability::NonNullable; use crate::dtype::PType; use crate::dtype::UnsignedPType; + use crate::session::ArraySession; use crate::validity::Validity; + static SESSION: LazyLock = + LazyLock::new(|| VortexSession::empty().with::()); + #[test] fn nullable_codes_validity() { let dict = DictArray::try_new( @@ -338,10 +349,7 @@ mod test { .as_ref() .validity() .unwrap() - .execute_mask( - dict.as_ref().len(), - &mut LEGACY_SESSION.create_execution_ctx(), - ) + .execute_mask(dict.as_ref().len(), &mut SESSION.create_execution_ctx()) .unwrap(); let AllOr::Some(indices) = mask.indices() else { vortex_panic!("Expected indices from mask") @@ -364,10 +372,7 @@ mod test { .as_ref() .validity() .unwrap() - .execute_mask( - dict.as_ref().len(), - &mut LEGACY_SESSION.create_execution_ctx(), - ) + .execute_mask(dict.as_ref().len(), &mut SESSION.create_execution_ctx()) .unwrap(); let AllOr::Some(indices) = mask.indices() else { vortex_panic!("Expected indices from mask") @@ -394,10 +399,7 @@ mod test { .as_ref() .validity() .unwrap() - .execute_mask( - dict.as_ref().len(), - &mut LEGACY_SESSION.create_execution_ctx(), - ) + .execute_mask(dict.as_ref().len(), &mut SESSION.create_execution_ctx()) .unwrap(); let AllOr::Some(indices) = mask.indices() else { vortex_panic!("Expected indices from mask") @@ -420,10 +422,7 @@ mod test { .as_ref() .validity() .unwrap() - .execute_mask( - dict.as_ref().len(), - &mut LEGACY_SESSION.create_execution_ctx(), - ) + .execute_mask(dict.as_ref().len(), &mut SESSION.create_execution_ctx()) .unwrap(); let AllOr::Some(indices) = mask.indices() else { vortex_panic!("Expected indices from mask") @@ -470,10 +469,9 @@ mod test { &DType::Primitive(PType::U64, NonNullable), len * chunk_count, ); - array.append_to_builder(builder.as_mut(), &mut LEGACY_SESSION.create_execution_ctx())?; + array.append_to_builder(builder.as_mut(), &mut SESSION.create_execution_ctx())?; - #[expect(deprecated)] - let into_prim = array.to_primitive(); + let into_prim = array.execute::(&mut SESSION.create_execution_ctx())?; let prim_into = builder.finish_into_canonical().into_primitive(); assert_arrays_eq!(into_prim, prim_into); diff --git a/vortex-array/src/arrays/dict/take.rs b/vortex-array/src/arrays/dict/take.rs index 78a80ff8277..6254e6e1ce2 100644 --- a/vortex-array/src/arrays/dict/take.rs +++ b/vortex-array/src/arrays/dict/take.rs @@ -10,9 +10,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; @@ -106,6 +108,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)] @@ -171,3 +197,31 @@ pub(crate) fn propagate_take_stats( ) }) } + +#[cfg(test)] +mod tests { + use vortex_error::VortexResult; + use vortex_error::vortex_bail; + + use crate::IntoArray; + use crate::ParentRef; + 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) = ParentRef::from_parts(&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 33db223de72..8ed45c501c3 100644 --- a/vortex-array/src/arrays/dict/vtable/mod.rs +++ b/vortex-array/src/arrays/dict/vtable/mod.rs @@ -30,6 +30,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; @@ -199,7 +200,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 852593abddb..f8fbf547687 100644 --- a/vortex-array/src/arrays/extension/vtable/mod.rs +++ b/vortex-array/src/arrays/extension/vtable/mod.rs @@ -20,6 +20,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; @@ -191,7 +192,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 dd811ad24a2..53783c2bac1 100644 --- a/vortex-array/src/arrays/filter/array.rs +++ b/vortex-array/src/arrays/filter/array.rs @@ -56,7 +56,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(), @@ -91,25 +91,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(smallvec![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`]. The parts can then be optimized through + /// [`ParentRef::optimize`](crate::array::ParentRef::optimize) or materialized + /// directly with [`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(smallvec![Some(array)]), - ) - }) + Ok(ArrayParts::new(Filter, dtype, len, data).with_slots(smallvec![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(smallvec![Some(array)]) } } diff --git a/vortex-array/src/arrays/filter/kernel.rs b/vortex-array/src/arrays/filter/kernel.rs index ef8f8671eda..35e12e7ccfa 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,30 @@ 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::ParentRef; + 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) = ParentRef::from_parts(&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 9f70e6e2614..0e601f5c330 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; @@ -65,6 +66,7 @@ impl VTable for Filter { type TypedArrayData = FilterData; type OperationsVTable = Self; type ValidityVTable = Self; + fn id(&self) -> ArrayId { static ID: CachedId = CachedId::new("vortex.filter"); *ID @@ -164,7 +166,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 52b041794cd..81afb317238 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; @@ -60,6 +61,7 @@ impl VTable for FixedSizeList { type OperationsVTable = Self; type ValidityVTable = Self; + fn id(&self) -> ArrayId { static ID: CachedId = CachedId::new("vortex.fixed_size_list"); *ID @@ -79,7 +81,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 9f5e7014069..3bc7394ca79 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; @@ -66,6 +67,7 @@ impl VTable for List { type OperationsVTable = Self; type ValidityVTable = Self; + fn id(&self) -> ArrayId { static ID: CachedId = CachedId::new("vortex.list"); *ID @@ -85,7 +87,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 af2c8c05eb6..eda8e10334a 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; @@ -72,6 +73,7 @@ impl VTable for ListView { type OperationsVTable = Self; type ValidityVTable = Self; + fn id(&self) -> ArrayId { static ID: CachedId = CachedId::new("vortex.listview"); *ID @@ -211,7 +213,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 257448c6eec..c95bc4b61d3 100644 --- a/vortex-array/src/arrays/masked/vtable/mod.rs +++ b/vortex-array/src/arrays/masked/vtable/mod.rs @@ -27,6 +27,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; @@ -186,7 +187,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 dd31ef16853..dfd1a220f38 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 f35a13600c5..a89c1539985 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 5130665cd30..aaaab6378c5 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 c0249ac4824..68e04047b46 100644 --- a/vortex-array/src/arrays/scalar_fn/vtable/mod.rs +++ b/vortex-array/src/arrays/scalar_fn/vtable/mod.rs @@ -26,6 +26,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; @@ -159,7 +160,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) @@ -206,12 +207,12 @@ pub struct AnyScalarFn; impl Matcher for AnyScalarFn { type Match<'a> = ArrayView<'a, ScalarFn>; - fn matches(array: &ArrayRef) -> bool { - array.is::() + fn matches_parent(parent: &ParentRef<'_>) -> bool { + ScalarFn::matches_parent(parent) } - fn try_match(array: &ArrayRef) -> Option> { - array.as_opt::() + fn try_match_parent<'a>(parent: &ParentRef<'a>) -> Option> { + parent.try_array_view::() } } @@ -222,20 +223,18 @@ pub struct ExactScalarFn(PhantomData); impl Matcher for ExactScalarFn { type Match<'a> = ScalarFnArrayView<'a, F>; - fn matches(array: &ArrayRef) -> bool { - if let Some(scalar_fn_array) = array.as_opt::() { - scalar_fn_array.data().scalar_fn().is::() - } else { - false - } + fn matches_parent(parent: &ParentRef<'_>) -> bool { + parent + .typed_data::() + .is_some_and(|data| data.scalar_fn().is::()) } - fn try_match(array: &ArrayRef) -> Option> { - let scalar_fn_array = array.as_opt::()?; + fn try_match_parent<'a>(parent: &ParentRef<'a>) -> Option> { + let scalar_fn_array = parent.try_array_view::()?; let scalar_fn_data = scalar_fn_array.data(); let scalar_fn = scalar_fn_data.scalar_fn().downcast_ref::()?; Some(ScalarFnArrayView { - array, + array: scalar_fn_array.array(), vtable: scalar_fn.vtable(), options: scalar_fn.options(), }) diff --git a/vortex-array/src/arrays/shared/vtable.rs b/vortex-array/src/arrays/shared/vtable.rs index f13a262479e..d7719ef5cbd 100644 --- a/vortex-array/src/arrays/shared/vtable.rs +++ b/vortex-array/src/arrays/shared/vtable.rs @@ -52,6 +52,7 @@ impl VTable for Shared { type TypedArrayData = SharedData; type OperationsVTable = Self; type ValidityVTable = Self; + fn id(&self) -> ArrayId { static ID: CachedId = CachedId::new("vortex.shared"); *ID diff --git a/vortex-array/src/arrays/slice/array.rs b/vortex-array/src/arrays/slice/array.rs index 9d7e0bb13ec..3cbb0e3cec4 100644 --- a/vortex-array/src/arrays/slice/array.rs +++ b/vortex-array/src/arrays/slice/array.rs @@ -84,25 +84,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. The parts can then be + /// optimized through [`ParentRef::optimize`](crate::array::ParentRef::optimize) + /// or materialized directly with [`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(smallvec![Some(child)]), - ) - }) + Ok(ArrayParts::new(Slice, dtype, len, data).with_slots(smallvec![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(smallvec![Some(child)]), - ) - } + ArrayParts::new(Slice, dtype, len, data).with_slots(smallvec![Some(child)]) } } diff --git a/vortex-array/src/arrays/slice/mod.rs b/vortex-array/src/arrays/slice/mod.rs index 8eec9d85310..f0ffe5c7f7b 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 + /// borrowed from [`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 ac0ecc18039..71860ca22d7 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; @@ -63,6 +64,7 @@ impl VTable for Slice { type TypedArrayData = SliceData; type OperationsVTable = Self; type ValidityVTable = Self; + fn id(&self) -> ArrayId { static ID: CachedId = CachedId::new("vortex.slice"); *ID @@ -153,7 +155,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_/compute/cast.rs b/vortex-array/src/arrays/struct_/compute/cast.rs index f954dbe2fea..c044b11854c 100644 --- a/vortex-array/src/arrays/struct_/compute/cast.rs +++ b/vortex-array/src/arrays/struct_/compute/cast.rs @@ -9,6 +9,7 @@ use crate::ArrayRef; use crate::ArrayView; use crate::ExecutionCtx; use crate::IntoArray; +use crate::ParentRef; use crate::arrays::ConstantArray; use crate::arrays::Struct; use crate::arrays::StructArray; @@ -23,14 +24,14 @@ use crate::scalar_fn::fns::cast::Cast; pub(crate) fn struct_cast_execute_parent( child: &ArrayRef, - parent: &ArrayRef, + parent: &ParentRef, _child_idx: usize, ctx: &mut ExecutionCtx, ) -> VortexResult> { let Some(array) = child.as_opt::() else { return Ok(None); }; - let Some(parent) = ExactScalarFn::::try_match(parent) else { + let Some(parent) = ExactScalarFn::::try_match_parent(parent) else { return Ok(None); }; @@ -124,6 +125,7 @@ mod tests { use crate::ArrayRef; use crate::ExecutionCtx; use crate::IntoArray; + use crate::ParentRef; use crate::VortexSessionExecute; use crate::arrays::ConstantArray; use crate::arrays::PrimitiveArray; @@ -153,7 +155,7 @@ mod tests { fn null_struct_cast_execute_parent( child: &ArrayRef, - parent: &ArrayRef, + parent: &ParentRef<'_>, _child_idx: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult> { diff --git a/vortex-array/src/arrays/struct_/compute/rules.rs b/vortex-array/src/arrays/struct_/compute/rules.rs index 99cfe819508..d1de0f1ca95 100644 --- a/vortex-array/src/arrays/struct_/compute/rules.rs +++ b/vortex-array/src/arrays/struct_/compute/rules.rs @@ -6,6 +6,7 @@ use vortex_error::vortex_err; use crate::ArrayRef; use crate::IntoArray; +use crate::ParentRef; use crate::array::ArrayView; use crate::arrays::ConstantArray; use crate::arrays::Struct; @@ -35,13 +36,13 @@ pub(crate) const PARENT_RULES: ParentRuleSet = ParentRuleSet::new(&[ pub(crate) fn struct_cast_reduce_parent( child: &ArrayRef, - parent: &ArrayRef, + parent: &ParentRef<'_>, _child_idx: usize, ) -> VortexResult> { let Some(array) = child.as_opt::() else { return Ok(None); }; - let Some(parent) = ExactScalarFn::::try_match(parent) else { + let Some(parent) = ExactScalarFn::::try_match_parent(parent) else { return Ok(None); }; @@ -131,6 +132,7 @@ mod tests { use crate::ArrayRef; use crate::IntoArray; + use crate::ParentRef; use crate::array::ArrayPlugin; use crate::arrays::ScalarFn; use crate::arrays::Struct; @@ -153,12 +155,13 @@ mod tests { use crate::scalar_fn::ScalarFnVTable; use crate::scalar_fn::fns::cast::Cast; use crate::validity::Validity; + static SESSION: LazyLock = LazyLock::new(|| VortexSession::empty().with::()); fn no_struct_cast_plugin( _child: &ArrayRef, - _parent: &ArrayRef, + _parent: &ParentRef<'_>, _child_idx: usize, ) -> VortexResult> { Ok(None) diff --git a/vortex-array/src/arrays/struct_/vtable/mod.rs b/vortex-array/src/arrays/struct_/vtable/mod.rs index 0113535ad21..62e024619a4 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; @@ -41,6 +42,7 @@ impl VTable for Struct { type OperationsVTable = Self; type ValidityVTable = Self; + fn id(&self) -> ArrayId { static ID: CachedId = CachedId::new("vortex.struct"); *ID @@ -189,7 +191,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 86053613e50..acd7d905aa7 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; @@ -69,6 +70,7 @@ impl VTable for VarBin { type OperationsVTable = Self; type ValidityVTable = Self; + fn id(&self) -> ArrayId { static ID: CachedId = CachedId::new("vortex.varbin"); *ID @@ -175,7 +177,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 45db5d904ac..fa541e2e839 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/canonical.rs b/vortex-array/src/canonical.rs index 9ccaf027b7a..0b3acd3244d 100644 --- a/vortex-array/src/canonical.rs +++ b/vortex-array/src/canonical.rs @@ -17,6 +17,7 @@ use crate::Executable; use crate::ExecutionCtx; use crate::IntoArray; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::array::child_to_validity; use crate::arrays::Bool; use crate::arrays::BoolArray; @@ -1005,41 +1006,42 @@ pub struct AnyCanonical; impl Matcher for AnyCanonical { type Match<'a> = CanonicalView<'a>; - fn matches(array: &ArrayRef) -> bool { - array.is::() - || array.is::() - || array.is::() - || array.is::() - || array.is::() - || array.is::() - || array.is::() - || array.is::() - || array.is::() - || array.is::() - || array.is::() + fn matches_parent(parent: &ParentRef<'_>) -> bool { + Null::matches_parent(parent) + || Bool::matches_parent(parent) + || Primitive::matches_parent(parent) + || Decimal::matches_parent(parent) + || Struct::matches_parent(parent) + || ListView::matches_parent(parent) + || FixedSizeList::matches_parent(parent) + || VarBinView::matches_parent(parent) + || Variant::matches_parent(parent) + || Extension::matches_parent(parent) } - fn try_match(array: &ArrayRef) -> Option> { - if let Some(a) = array.as_opt::() { + fn try_match_parent<'a>(parent: &ParentRef<'a>) -> Option> { + if let Some(a) = parent.try_array_view::() { Some(CanonicalView::Null(a)) - } else if let Some(a) = array.as_opt::() { + } else if let Some(a) = parent.try_array_view::() { Some(CanonicalView::Bool(a)) - } else if let Some(a) = array.as_opt::() { + } else if let Some(a) = parent.try_array_view::() { Some(CanonicalView::Primitive(a)) - } else if let Some(a) = array.as_opt::() { + } else if let Some(a) = parent.try_array_view::() { Some(CanonicalView::Decimal(a)) - } else if let Some(a) = array.as_opt::() { + } else if let Some(a) = parent.try_array_view::() { Some(CanonicalView::Struct(a)) - } else if let Some(a) = array.as_opt::() { + } else if let Some(a) = parent.try_array_view::() { Some(CanonicalView::List(a)) - } else if let Some(a) = array.as_opt::() { + } else if let Some(a) = parent.try_array_view::() { Some(CanonicalView::FixedSizeList(a)) - } else if let Some(a) = array.as_opt::() { + } else if let Some(a) = parent.try_array_view::() { Some(CanonicalView::VarBinView(a)) - } else if let Some(a) = array.as_opt::() { + } else if let Some(a) = parent.try_array_view::() { Some(CanonicalView::Variant(a)) } else { - array.as_opt::().map(CanonicalView::Extension) + parent + .try_array_view::() + .map(CanonicalView::Extension) } } } diff --git a/vortex-array/src/columnar.rs b/vortex-array/src/columnar.rs index 2e4bdc328fd..659437ffa21 100644 --- a/vortex-array/src/columnar.rs +++ b/vortex-array/src/columnar.rs @@ -12,6 +12,7 @@ use crate::Executable; use crate::ExecutionCtx; use crate::IntoArray; use crate::array::ArrayView; +use crate::array::ParentRef; use crate::arrays::Constant; use crate::arrays::ConstantArray; use crate::dtype::DType; @@ -93,11 +94,15 @@ pub struct AnyColumnar; impl Matcher for AnyColumnar { type Match<'a> = ColumnarView<'a>; - fn try_match(array: &ArrayRef) -> Option> { - if let Some(constant) = array.as_opt::() { + fn matches_parent(parent: &ParentRef<'_>) -> bool { + Constant::matches_parent(parent) || AnyCanonical::matches_parent(parent) + } + + fn try_match_parent<'a>(parent: &ParentRef<'a>) -> Option> { + if let Some(constant) = parent.try_array_view::() { Some(ColumnarView::Constant(constant)) } else { - array.as_opt::().map(ColumnarView::Canonical) + AnyCanonical::try_match_parent(parent).map(ColumnarView::Canonical) } } } diff --git a/vortex-array/src/executor.rs b/vortex-array/src/executor.rs index f6a2496335d..7b783028e6c 100644 --- a/vortex-array/src/executor.rs +++ b/vortex-array/src/executor.rs @@ -31,6 +31,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; @@ -406,9 +407,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, @@ -546,8 +548,9 @@ fn execute_parent_for_child( && let Some(plugins) = kernels.find_execute_parent(parent.encoding_id(), child.encoding_id()) { + let parent_ref = ParentRef::from_array_ref(parent); for plugin in plugins.as_ref() { - if let Some(result) = plugin(child, parent, slot_idx, ctx)? { + if let Some(result) = plugin(child, &parent_ref, slot_idx, ctx)? { return Ok(Some(result)); } } diff --git a/vortex-array/src/matcher.rs b/vortex-array/src/matcher.rs index 532931df083..029c0947005 100644 --- a/vortex-array/src/matcher.rs +++ b/vortex-array/src/matcher.rs @@ -2,18 +2,39 @@ // 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. fn matches(array: &ArrayRef) -> bool { - Self::try_match(array).is_some() + let parent = ParentRef::from_array_ref(array); + Self::matches_parent(&parent) } /// Try to match the given array, returning the matched view type if successful. - fn try_match(array: &ArrayRef) -> Option>; + /// + /// This compatibility entry point delegates through [`ParentRef::from_array_ref`]. + /// Implement [`Matcher::try_match_parent`] for new matchers. + fn try_match(array: &ArrayRef) -> Option> { + let parent = ParentRef::from_array_ref(array); + Self::try_match_parent(&parent) + } + + /// Try to match a [`ParentRef`]. + /// + /// This is the primary matching entry point. Matchers whose `Match` type requires + /// an [`ArrayRef`] can use [`ParentRef::array_ref`] or [`ParentRef::try_array_view`], + /// while matchers that can handle stack-allocated parents should use + /// [`ParentRef::try_view`]. + fn try_match_parent<'a>(parent: &ParentRef<'a>) -> Option>; + + /// Check if the given parent matches this matcher type. + fn matches_parent(parent: &ParentRef<'_>) -> bool { + Self::try_match_parent(parent).is_some() + } } /// Matches any array type (wildcard matcher) @@ -24,12 +45,12 @@ impl Matcher for AnyArray { type Match<'a> = &'a ArrayRef; #[inline(always)] - fn matches(_array: &ArrayRef) -> bool { - true + fn try_match_parent<'a>(parent: &ParentRef<'a>) -> Option> { + parent.array_ref() } #[inline(always)] - fn try_match(array: &ArrayRef) -> Option> { - Some(array) + fn matches_parent(parent: &ParentRef<'_>) -> bool { + parent.array_ref().is_some() } } diff --git a/vortex-array/src/optimizer/kernels.rs b/vortex-array/src/optimizer/kernels.rs index d38bc9402d1..73f0ce15ef3 100644 --- a/vortex-array/src/optimizer/kernels.rs +++ b/vortex-array/src/optimizer/kernels.rs @@ -31,6 +31,7 @@ use std::sync::Arc; use std::sync::LazyLock; use arc_swap::ArcSwap; +use vortex_array::arrays::Struct; use vortex_error::VortexResult; use vortex_session::Ref; use vortex_session::SessionExt; @@ -39,13 +40,13 @@ use vortex_session::registry::Id; use vortex_utils::aliases::DefaultHashBuilder; use vortex_utils::aliases::hash_map::HashMap; +use crate::ArrayPlugin; use crate::ArrayRef; use crate::ExecutionCtx; -use crate::array::VTable; -use crate::arrays::Struct; +use crate::array::ParentRef; use crate::arrays::struct_::compute::cast::struct_cast_execute_parent; use crate::arrays::struct_::compute::rules::struct_cast_reduce_parent; -use crate::scalar_fn::ScalarFnVTable; +use crate::scalar_fn::ScalarFnPlugin; use crate::scalar_fn::fns::cast::Cast; /// Shared hasher used to combine `(outer, child)` tuples into registry keys. @@ -59,8 +60,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>; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Ord, PartialOrd)] #[repr(transparent)] @@ -88,7 +92,7 @@ impl Borrow for ReduceParentFnId { /// required of static `execute_parent` kernels. pub type ExecuteParentFn = fn( child: &ArrayRef, - parent: &ArrayRef, + parent: &ParentRef<'_>, child_idx: usize, ctx: &mut ExecutionCtx, ) -> VortexResult>; diff --git a/vortex-array/src/optimizer/mod.rs b/vortex-array/src/optimizer/mod.rs index d6e93ca0561..794ceee5f07 100644 --- a/vortex-array/src/optimizer/mod.rs +++ b/vortex-array/src/optimizer/mod.rs @@ -22,6 +22,7 @@ use vortex_session::SessionExt; use vortex_session::VortexSession; use crate::ArrayRef; +use crate::array::ParentRef; use crate::optimizer::kernels::ArrayKernels; pub mod kernels; @@ -87,6 +88,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 }; @@ -96,7 +98,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; @@ -104,7 +106,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..436d25031bb 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,18 @@ 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 +/// [`ParentRef::optimize`](crate::array::ParentRef::optimize). Construction-side +/// callers borrow `ArrayParts` as a [`ParentRef`] and only materialize the `ArrayRef` +/// if no stack-backed parent rule fires. The default +/// `reduce_parent_ref` falls through to [`reduce_parent`](Self::reduce_parent) via +/// [`Matcher::try_match_parent`]. Whether that can match stack-allocated parents +/// depends on the matcher; for example the blanket `VTable` matcher returns an +/// [`ArrayView`] and therefore still requires a heap-allocated parent. pub trait ArrayParentReduceRule: Debug + Send + Sync + 'static { /// The parent array type this rule matches against. type Parent: Matcher; @@ -58,23 +71,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 matcher can produce an + /// `ArrayView`. Rules that override `reduce_parent_ref` instead can rewrite + /// stack-allocated parents via [`ParentRef::optimize`](crate::array::ParentRef::optimize) + /// without forcing an `Arc>` allocation. + /// + /// Existing implementations can stay; the default `reduce_parent_ref` continues + /// to delegate here when the matcher can materialize its `Match` type. 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`] 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 using [`ParentRef::optimize`](crate::array::ParentRef::optimize) avoid + /// materializing an `Arc>` 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 +153,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 +223,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); }