Expand description
Filter Pushdown Optimization Process
The filter pushdown mechanism involves four key steps:
- Optimizer Asks Parent for a Filter Pushdown Plan: The optimizer calls
ExecutionPlan::gather_filters_for_pushdown
on the parent node, passing in parent predicates and phase. The parent node creates aFilterDescription
by inspecting its logic and children’s schemas, determining which filters can be pushed to each child. - Optimizer Executes Pushdown: The optimizer recursively calls
push_down_filters
in this module on each child, passing the appropriate filters (Vec<Arc<dyn PhysicalExpr>>
) for that child. - Optimizer Gathers Results: The optimizer collects
FilterPushdownPropagation
results from children, containing information about which filters were successfully pushed down vs. unsupported. - Parent Responds: The optimizer calls
ExecutionPlan::handle_child_pushdown_result
on the parent, passing aChildPushdownResult
containing the aggregated pushdown outcomes. The parent decides how to handle filters that couldn’t be pushed down (e.g., keep them as FilterExec nodes).
Structs§
- Filter
Pushdown - Attempts to recursively push given filters from the top of the tree into leafs.