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

Method try_pushdown_projection

datafusion/datasource-csv/src/source.rs:274–284  ·  view source on GitHub ↗
(
        &self,
        projection: &ProjectionExprs,
    )

Source from the content-addressed store, hash-verified

272 }
273
274 fn try_pushdown_projection(
275 &self,
276 projection: &ProjectionExprs,
277 ) -> Result<Option<Arc<dyn FileSource>>> {
278 let mut source = self.clone();
279 let new_projection = self.projection.source.try_merge(projection)?;
280 let split_projection =
281 SplitProjection::new(self.table_schema.file_schema(), &new_projection);
282 source.projection = split_projection;
283 Ok(Some(Arc::new(source)))
284 }
285
286 fn projection(&self) -> Option<&ProjectionExprs> {
287 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