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

Method try_optimize_proj

datafusion/optimizer/src/common_subexpr_eliminate.rs:77–94  ·  view source on GitHub ↗
(
        &self,
        projection: Projection,
        config: &dyn OptimizerConfig,
    )

Source from the content-addressed store, hash-verified

75 }
76
77 fn try_optimize_proj(
78 &self,
79 projection: Projection,
80 config: &dyn OptimizerConfig,
81 ) -> Result<Transformed<LogicalPlan>> {
82 let Projection {
83 expr,
84 input,
85 schema,
86 ..
87 } = projection;
88 let input = Arc::unwrap_or_clone(input);
89 self.try_unary_plan(expr, input, config)?
90 .map_data(|(new_expr, new_input)| {
91 Projection::try_new_with_schema(new_expr, Arc::new(new_input), schema)
92 .map(LogicalPlan::Projection)
93 })
94 }
95
96 fn try_optimize_sort(
97 &self,

Callers 1

rewriteMethod · 0.80

Calls 4

newFunction · 0.85
map_dataMethod · 0.80
try_unary_planMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected