pub trait SQLTable:
Debug
+ Send
+ Sync {
// Required methods
fn as_any(&self) -> &dyn Any;
fn table_reference(&self) -> TableReference;
fn schema(&self) -> SchemaRef;
// Provided methods
fn logical_optimizer(&self) -> Option<LogicalOptimizer> { ... }
fn ast_analyzer(&self) -> Option<AstAnalyzer> { ... }
}Expand description
Trait to represent a SQL remote table inside SQLTableSource.
A remote table provides information such as schema, table reference, and
provides hooks for rewriting the logical plan and AST before execution.
This crate provides RemoteTable as a default ready-to-use type.
Required Methods§
Sourcefn table_reference(&self) -> TableReference
fn table_reference(&self) -> TableReference
Provides the TableReference used to identify the table in SQL queries.
This TableReference is used for registering the table with the SQLSchemaProvider.
If the table provider is registered in the Datafusion context under a different name,
the logical plan will be rewritten to use this table reference during execution.
Therefore, any AST analyzer should match against this table reference.
Provided Methods§
Sourcefn logical_optimizer(&self) -> Option<LogicalOptimizer>
fn logical_optimizer(&self) -> Option<LogicalOptimizer>
Returns a logical optimizer specific to this table, will be used to modify the logical plan before execution
Sourcefn ast_analyzer(&self) -> Option<AstAnalyzer>
fn ast_analyzer(&self) -> Option<AstAnalyzer>
Returns an AST analyzer specific to this table, will be used to modify the AST before execution