pub trait TableSource: Sync + Send {
    fn as_any(&self) -> &dyn Any;
    fn schema(&self) -> SchemaRef;

    fn table_type(&self) -> TableType { ... }
    fn supports_filter_pushdown(
        &self,
        _filter: &Expr
    ) -> Result<TableProviderFilterPushDown> { ... } }
Expand description

The TableSource trait is used during logical query planning and optimizations and provides access to schema information and filter push-down capabilities. This trait provides a subset of the functionality of the TableProvider trait in the core datafusion crate. The TableProvider trait provides additional capabilities needed for physical query execution (such as the ability to perform a scan). The reason for having two separate traits is to avoid having the logical plan code be dependent on the DataFusion execution engine. Other projects may want to use DataFusion’s logical plans and have their own execution engine.

Required Methods

Get a reference to the schema for this table

Provided Methods

Get the type of this table for metadata/catalog purposes.

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

Implementors