Struct datafusion::datasource::listing::ListingTable [−][src]
pub struct ListingTable { /* fields omitted */ }
Expand description
An implementation of TableProvider
that uses the object store
or file system listing capability to get the list of files.
Implementations
pub fn new(
object_store: Arc<dyn ObjectStore>,
table_path: String,
file_schema: SchemaRef,
options: ListingOptions
) -> Self
pub fn new(
object_store: Arc<dyn ObjectStore>,
table_path: String,
file_schema: SchemaRef,
options: ListingOptions
) -> Self
Create new table that lists the FS to get the files to scan.
The provided schema
must be resolved before creating the table
and should contain the fields of the file without the table
partitioning columns.
Get object store ref
Get path ref
Get options ref
Trait Implementations
fn scan<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
projection: &'life1 Option<Vec<usize>>,
batch_size: usize,
filters: &'life2 [Expr],
limit: Option<usize>
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ExecutionPlan>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn scan<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
projection: &'life1 Option<Vec<usize>>,
batch_size: usize,
filters: &'life2 [Expr],
limit: Option<usize>
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ExecutionPlan>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Create an ExecutionPlan that will scan the table. The table provider will be usually responsible of grouping the source data into partitions that can be efficiently parallelized or distributed. Read more
Tests whether the table provider can make use of a filter expression to optimise data retrieval. Read more
Get the type of this table for metadata/catalog purposes.