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

Method scan_with_args

datafusion/catalog/src/table.rs:209–221  ·  view source on GitHub ↗

Create an [`ExecutionPlan`] for scanning the table using structured arguments. This method uses [`ScanArgs`] to pass scan parameters in a structured way and returns a [`ScanResult`] containing the execution plan. Table providers can override this method to take advantage of additional parameters like the upcoming `preferred_ordering` that may not be available through other scan methods. # Argum

(
        &self,
        state: &dyn Session,
        args: ScanArgs<'a>,
    )

Source from the content-addressed store, hash-verified

207 ///
208 /// See [`Self::scan`] for detailed documentation about projection, filters, and limits.
209 async fn scan_with_args<'a>(
210 &self,
211 state: &dyn Session,
212 args: ScanArgs<'a>,
213 ) -> Result<ScanResult> {
214 let filters = args.filters().unwrap_or(&[]);
215 let projection = args.projection().map(|p| p.to_vec());
216 let limit = args.limit();
217 let plan = self
218 .scan(state, projection.as_ref(), filters, limit)
219 .await?;
220 Ok(plan.into())
221 }
222
223 /// Specify if DataFusion should provide filter expressions to the
224 /// TableProvider to apply *during* the scan.

Callers

nothing calls this directly

Implementers 15

simple_udtf.rsdatafusion-examples/examples/udf/simpl
parquet_advanced_index.rsdatafusion-examples/examples/data_io/p
parquet_embedded_index.rsdatafusion-examples/examples/data_io/p
remote_catalog.rsdatafusion-examples/examples/data_io/r
parquet_index.rsdatafusion-examples/examples/data_io/p
default_column_values.rsdatafusion-examples/examples/custom_da
custom_datasource.rsdatafusion-examples/examples/custom_da
physical_planner.rsdatafusion/core/src/physical_planner.r
mod.rsdatafusion/core/src/dataframe/mod.rs
mod.rsdatafusion/core/src/test_util/mod.rs
provider_filter_pushdown.rsdatafusion/core/tests/custom_sources_c
mod.rsdatafusion/core/tests/custom_sources_c

Calls 8

filtersMethod · 0.80
to_vecMethod · 0.80
mapMethod · 0.45
projectionMethod · 0.45
limitMethod · 0.45
scanMethod · 0.45
as_refMethod · 0.45
intoMethod · 0.45

Tested by

no test coverage detected