pub trait PlanParentReduceRule<C: PlanVTable>:
Debug
+ Send
+ Sync
+ 'static {
type Parent: PlanVTable;
// Required method
fn reduce_parent(
&self,
child: &Plan<C>,
parent: &Plan<Self::Parent>,
child_idx: usize,
) -> VortexResult<Option<PlanRef>>;
}Expand description
A metadata-only rewrite where a child plan rewrites its parent plan.
Rules return one rewrite without recursively optimizing the replacement. The plan optimizer owns traversal and drives further rewrites.
Required Associated Types§
Sourcetype Parent: PlanVTable
type Parent: PlanVTable
The concrete parent operator matched by this rule.
Required Methods§
Sourcefn reduce_parent(
&self,
child: &Plan<C>,
parent: &Plan<Self::Parent>,
child_idx: usize,
) -> VortexResult<Option<PlanRef>>
fn reduce_parent( &self, child: &Plan<C>, parent: &Plan<Self::Parent>, child_idx: usize, ) -> VortexResult<Option<PlanRef>>
Attempts to replace parent based on its child at child_idx.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".