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]

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.

Loading content...

Provided methods

fn supports_filter_pushdown(
    &self,
    _filter: &Expr
) -> Result<TableProviderFilterPushDown>
[src]

Tests whether the table provider can make use of a filter expression to optimise data retrieval.

Loading content...

Implementors

impl TableProvider for CsvFile[src]

impl TableProvider for EmptyTable[src]

impl TableProvider for MemTable[src]

impl TableProvider for ParquetTable[src]

fn schema(&self) -> SchemaRef[src]

Get the schema for this parquet file.

fn scan(
    &self,
    projection: &Option<Vec<usize>>,
    batch_size: usize,
    filters: &[Expr],
    limit: Option<usize>
) -> Result<Arc<dyn ExecutionPlan>>
[src]

Scan the file(s), using the provided projection, and return one BatchIterator per partition.

Loading content...