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

Method scan

datafusion/catalog/src/stream.rs:317–344  ·  view source on GitHub ↗
(
        &self,
        state: &dyn Session,
        projection: Option<&Vec<usize>>,
        _filters: &[Expr],
        limit: Option<usize>,
    )

Source from the content-addressed store, hash-verified

315 }
316
317 async fn scan(
318 &self,
319 state: &dyn Session,
320 projection: Option<&Vec<usize>>,
321 _filters: &[Expr],
322 limit: Option<usize>,
323 ) -> Result<Arc<dyn ExecutionPlan>> {
324 let projected_schema = match projection {
325 Some(p) => {
326 let projected = Arc::new(self.0.source.schema().project(p)?);
327 create_lex_ordering(&projected, &self.0.order, state.execution_props())?
328 }
329 None => create_lex_ordering(
330 self.0.source.schema(),
331 &self.0.order,
332 state.execution_props(),
333 )?,
334 };
335
336 Ok(Arc::new(StreamingTableExec::try_new(
337 Arc::clone(self.0.source.schema()),
338 vec![Arc::new(StreamRead(Arc::clone(&self.0))) as _],
339 projection,
340 projected_schema,
341 true,
342 limit,
343 )?))
344 }
345
346 async fn insert_into(
347 &self,

Callers

nothing calls this directly

Calls 5

newFunction · 0.85
create_lex_orderingFunction · 0.85
projectMethod · 0.45
schemaMethod · 0.45
execution_propsMethod · 0.45

Tested by

no test coverage detected