Trait datafusion_sql::planner::ContextProvider
source · pub trait ContextProvider {
// Required methods
fn get_table_provider(
&self,
name: TableReference<'_>
) -> Result<Arc<dyn TableSource>>;
fn get_function_meta(&self, name: &str) -> Option<Arc<ScalarUDF>>;
fn get_aggregate_meta(&self, name: &str) -> Option<Arc<AggregateUDF>>;
fn get_window_meta(&self, name: &str) -> Option<Arc<WindowUDF>>;
fn get_variable_type(&self, variable_names: &[String]) -> Option<DataType>;
fn options(&self) -> &ConfigOptions;
}
Expand description
The ContextProvider trait allows the query planner to obtain meta-data about tables and functions referenced in SQL statements
Required Methods§
sourcefn get_table_provider(
&self,
name: TableReference<'_>
) -> Result<Arc<dyn TableSource>>
fn get_table_provider( &self, name: TableReference<'_> ) -> Result<Arc<dyn TableSource>>
Getter for a datasource
sourcefn get_aggregate_meta(&self, name: &str) -> Option<Arc<AggregateUDF>>
fn get_aggregate_meta(&self, name: &str) -> Option<Arc<AggregateUDF>>
Getter for a UDAF description
sourcefn get_variable_type(&self, variable_names: &[String]) -> Option<DataType>
fn get_variable_type(&self, variable_names: &[String]) -> Option<DataType>
Getter for system/user-defined variable type
sourcefn options(&self) -> &ConfigOptions
fn options(&self) -> &ConfigOptions
Get configuration options