pub fn optimize(plan: LogicalPlan) -> LogicalPlanExpand description
Apply optimization rules to a logical plan.
Rules are applied bottom-up (children optimized first):
- Index scan selection: Filter(NodeScan) -> IndexScan when applicable
- Limit pushdown: Limit(NodeScan) -> NodeScan with limit annotation
- Constant folding: simplify constant expressions
- Projection pruning: merge consecutive Projects