Skip to main content

DynPlanParentReduceRule

Trait DynPlanParentReduceRule 

Source
pub trait DynPlanParentReduceRule:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn matches(&self, child: &PlanRef, parent: &PlanRef) -> bool;
    fn reduce_parent(
        &self,
        child: &PlanRef,
        parent: &PlanRef,
        child_idx: usize,
    ) -> VortexResult<Option<PlanRef>>;
}
Expand description

Type-erased interface used by PlanParentRuleSet.

Required Methods§

Source

fn matches(&self, child: &PlanRef, parent: &PlanRef) -> bool

Returns whether this rule supports the concrete child and parent operators.

Source

fn reduce_parent( &self, child: &PlanRef, parent: &PlanRef, child_idx: usize, ) -> VortexResult<Option<PlanRef>>

Attempts to replace parent based on child at child_idx.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§