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

Method try_pushdown_projection

datafusion/datasource-avro/src/source.rs:143–153  ·  view source on GitHub ↗
(
        &self,
        projection: &ProjectionExprs,
    )

Source from the content-addressed store, hash-verified

141 }
142
143 fn try_pushdown_projection(
144 &self,
145 projection: &ProjectionExprs,
146 ) -> Result<Option<Arc<dyn FileSource>>> {
147 let mut source = self.clone();
148 let new_projection = self.projection.source.try_merge(projection)?;
149 let split_projection =
150 SplitProjection::new(self.table_schema.file_schema(), &new_projection);
151 source.projection = split_projection;
152 Ok(Some(Arc::new(source)))
153 }
154
155 fn projection(&self) -> Option<&ProjectionExprs> {
156 Some(&self.projection.source)

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
try_mergeMethod · 0.80
cloneMethod · 0.45
file_schemaMethod · 0.45

Tested by

no test coverage detected