Skip to main content

CatalogTable

Trait CatalogTable 

Source
pub trait CatalogTable: Send + Sync {
    // Required methods
    fn schema(&self) -> SchemaRef;
    fn scan(
        &self,
        projection: Option<&[usize]>,
        filters: &[Expr],
        limit: Option<usize>,
    ) -> Result<SendableRecordBatchStream, FnError>;

    // Provided method
    fn statistics(&self) -> Option<Statistics> { ... }
}
Expand description

A queryable catalog table — like a DataFusion TableProvider but in the plugin namespace.

Required Methods§

Source

fn schema(&self) -> SchemaRef

Schema of rows this table produces.

Source

fn scan( &self, projection: Option<&[usize]>, filters: &[Expr], limit: Option<usize>, ) -> Result<SendableRecordBatchStream, FnError>

Stream rows matching the optional projection, filters, and limit.

§Errors

Returns FnError if the scan cannot start.

Provided Methods§

Source

fn statistics(&self) -> Option<Statistics>

Cardinality / size statistics, if known.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§