MCPcopy Create free account
hub / github.com/apache/paimon-rust / scan

Method scan

crates/integrations/datafusion/src/system_tables/files.rs:106–127  ·  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

104 }
105
106 async fn scan(
107 &self,
108 _state: &dyn Session,
109 projection: Option<&Vec<usize>>,
110 _filters: &[Expr],
111 _limit: Option<usize>,
112 ) -> DFResult<Arc<dyn ExecutionPlan>> {
113 let table = self.table.clone();
114 let rows =
115 crate::runtime::await_with_runtime(async move { collect_file_rows(&table).await })
116 .await
117 .map_err(to_datafusion_error)?;
118
119 let schema = files_schema();
120 let batch = file_rows_to_record_batch(&rows)?;
121
122 Ok(MemorySourceConfig::try_new_exec(
123 &[vec![batch]],
124 schema,
125 projection.cloned(),
126 )?)
127 }
128}
129
130#[derive(Debug)]

Callers

nothing calls this directly

Calls 4

await_with_runtimeFunction · 0.85
collect_file_rowsFunction · 0.85
files_schemaFunction · 0.85

Tested by

no test coverage detected