pub trait ArrayParentReduceRule<V: VTable>:
Debug
+ Send
+ Sync
+ 'static {
type Parent: Matcher;
// Required methods
fn parent(&self) -> Self::Parent;
fn reduce_parent(
&self,
array: &V::Array,
parent: <Self::Parent as Matcher>::View<'_>,
child_idx: usize,
) -> VortexResult<Option<ArrayRef>>;
}Expand description
A rewrite rule that transforms arrays based on parent context
Required Associated Types§
Required Methods§
Sourcefn reduce_parent(
&self,
array: &V::Array,
parent: <Self::Parent as Matcher>::View<'_>,
child_idx: usize,
) -> VortexResult<Option<ArrayRef>>
fn reduce_parent( &self, array: &V::Array, parent: <Self::Parent as Matcher>::View<'_>, child_idx: usize, ) -> VortexResult<Option<ArrayRef>>
Attempt to rewrite this child array given information about its parent.
Returns:
Ok(Some(new_array))if the rule applied successfullyOk(None)if the rule doesn’t applyErr(e)if an error occurred