Trait datafusion::datasource::datasource::TableProvider [−][src]
pub trait TableProvider: Sync + Send { fn as_any(&self) -> &dyn Any; fn schema(&self) -> SchemaRef; fn scan(
&self,
projection: &Option<Vec<usize>>,
batch_size: usize,
filters: &[Expr],
limit: Option<usize>
) -> Result<Arc<dyn ExecutionPlan>>; fn statistics(&self) -> Statistics; fn supports_filter_pushdown(
&self,
_filter: &Expr
) -> Result<TableProviderFilterPushDown> { ... } }
Source table
Required methods
fn as_any(&self) -> &dyn Any
[src]
Returns the table provider as Any
so that it can be
downcast to a specific implementation.
fn schema(&self) -> SchemaRef
[src]
Get a reference to the schema for this table
fn scan(
&self,
projection: &Option<Vec<usize>>,
batch_size: usize,
filters: &[Expr],
limit: Option<usize>
) -> Result<Arc<dyn ExecutionPlan>>
[src]
&self,
projection: &Option<Vec<usize>>,
batch_size: usize,
filters: &[Expr],
limit: Option<usize>
) -> Result<Arc<dyn ExecutionPlan>>
Create an ExecutionPlan that will scan the table.
fn statistics(&self) -> Statistics
[src]
Returns the table Statistics Statistics should be optional because not all data sources can provide statistics.
Provided methods
fn supports_filter_pushdown(
&self,
_filter: &Expr
) -> Result<TableProviderFilterPushDown>
[src]
&self,
_filter: &Expr
) -> Result<TableProviderFilterPushDown>
Tests whether the table provider can make use of a filter expression to optimise data retrieval.
Implementors
impl TableProvider for CsvFile
[src]
impl TableProvider for CsvFile
[src]impl TableProvider for EmptyTable
[src]
impl TableProvider for EmptyTable
[src]impl TableProvider for MemTable
[src]
impl TableProvider for MemTable
[src]impl TableProvider for ParquetTable
[src]
impl TableProvider for ParquetTable
[src]fn as_any(&self) -> &dyn Any
[src]
fn schema(&self) -> SchemaRef
[src]
Get the schema for this parquet file.
fn supports_filter_pushdown(
&self,
_filter: &Expr
) -> Result<TableProviderFilterPushDown>
[src]
&self,
_filter: &Expr
) -> Result<TableProviderFilterPushDown>
fn scan(
&self,
projection: &Option<Vec<usize>>,
batch_size: usize,
filters: &[Expr],
limit: Option<usize>
) -> Result<Arc<dyn ExecutionPlan>>
[src]
&self,
projection: &Option<Vec<usize>>,
batch_size: usize,
filters: &[Expr],
limit: Option<usize>
) -> Result<Arc<dyn ExecutionPlan>>
Scan the file(s), using the provided projection, and return one BatchIterator per partition.