pub trait PredicatePushdown {
// Required method
fn predicate_pushdown(
&self,
predicate: Condition,
ctx: &mut PredicatePushdownContext,
) -> PlanRef;
}
Expand description
The trait for predicate pushdown, only logical plan node will use it, though all plan node impl it.
Required Methods§
sourcefn predicate_pushdown(
&self,
predicate: Condition,
ctx: &mut PredicatePushdownContext,
) -> PlanRef
fn predicate_pushdown( &self, predicate: Condition, ctx: &mut PredicatePushdownContext, ) -> PlanRef
Push predicate down for every logical plan node.
There are three kinds of predicates:
-
those can’t be pushed down. We just create a
LogicalFilter
for them above the currentPlanNode
. i.e.,ⓘLogicalFilter::create(self.clone().into(), predicate)
-
those can be merged with current
PlanNode
(e.g.,LogicalJoin
). We just merge the predicates with theCondition
of it. -
those can be pushed down. We pass them to current
PlanNode
’s input.