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

Method projection_mapping

datafusion/physical-expr/src/projection.rs:247–257  ·  view source on GitHub ↗

Creates a ProjectionMapping from this projection

(
        &self,
        input_schema: &SchemaRef,
    )

Source from the content-addressed store, hash-verified

245
246 /// Creates a ProjectionMapping from this projection
247 pub fn projection_mapping(
248 &self,
249 input_schema: &SchemaRef,
250 ) -> Result<ProjectionMapping> {
251 ProjectionMapping::try_new(
252 self.exprs
253 .iter()
254 .map(|p| (Arc::clone(&p.expr), p.alias.clone())),
255 input_schema,
256 )
257 }
258
259 /// Iterate over a clone of the projection expressions.
260 pub fn expr_iter(&self) -> impl Iterator<Item = Arc<dyn PhysicalExpr>> + '_ {

Callers 2

try_from_projectorMethod · 0.80
eq_propertiesMethod · 0.80

Calls 3

mapMethod · 0.45
iterMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected