(
&self,
plan: LogicalPlan,
config: &dyn OptimizerConfig,
)
| 115 | } |
| 116 | |
| 117 | fn rewrite( |
| 118 | &self, |
| 119 | plan: LogicalPlan, |
| 120 | config: &dyn OptimizerConfig, |
| 121 | ) -> Result<Transformed<LogicalPlan>> { |
| 122 | if !config.options().optimizer.enable_leaf_expression_pushdown { |
| 123 | return Ok(Transformed::no(plan)); |
| 124 | } |
| 125 | let alias_generator = config.alias_generator(); |
| 126 | |
| 127 | // Advance the alias generator past any user-provided __datafusion_extracted_N |
| 128 | // aliases to prevent collisions when generating new extraction aliases. |
| 129 | advance_generator_past_existing(&plan, alias_generator)?; |
| 130 | |
| 131 | plan.transform_down_with_subqueries(|plan| { |
| 132 | extract_from_plan(plan, alias_generator) |
| 133 | }) |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | /// Scans the current plan node's expressions for pre-existing |
nothing calls this directly
no test coverage detected