MCPcopy Create free account
hub / github.com/apache/datafusion / rewrite

Method rewrite

datafusion/optimizer/src/extract_leaf_expressions.rs:117–134  ·  view source on GitHub ↗
(
        &self,
        plan: LogicalPlan,
        config: &dyn OptimizerConfig,
    )

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

extract_from_planFunction · 0.85
try_push_inputFunction · 0.85
optionsMethod · 0.45
alias_generatorMethod · 0.45

Tested by

no test coverage detected