pub trait ArrayParentReduceRule<Child: Matcher, Parent: Matcher>:
Debug
+ Send
+ Sync
+ 'static {
// Required methods
fn child(&self) -> Child;
fn parent(&self) -> Parent;
fn reduce_parent(
&self,
child: Child::View<'_>,
parent: Parent::View<'_>,
child_idx: usize,
) -> VortexResult<Option<ArrayRef>>;
}Expand description
A rewrite rule that transforms arrays based on parent context
Required Methods§
Sourcefn reduce_parent(
&self,
child: Child::View<'_>,
parent: Parent::View<'_>,
child_idx: usize,
) -> VortexResult<Option<ArrayRef>>
fn reduce_parent( &self, child: Child::View<'_>, parent: Parent::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