Trait datafusion_federation::sql::SQLExecutor
source · pub trait SQLExecutor: Sync + Send {
// Required methods
fn name(&self) -> &str;
fn compute_context(&self) -> Option<String>;
fn dialect(&self) -> Arc<dyn Dialect>;
fn execute(
&self,
query: &str,
schema: SchemaRef,
) -> Result<SendableRecordBatchStream>;
fn table_names<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_table_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
table_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<SchemaRef>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn ast_analyzer(
&self,
) -> Option<Box<dyn Fn(Statement) -> Result<Statement>>> { ... }
}Required Methods§
sourcefn compute_context(&self) -> Option<String>
fn compute_context(&self) -> Option<String>
Executor compute context allows differentiating the remote compute context such as authorization or active database.
fn dialect(&self) -> Arc<dyn Dialect>
sourcefn execute(
&self,
query: &str,
schema: SchemaRef,
) -> Result<SendableRecordBatchStream>
fn execute( &self, query: &str, schema: SchemaRef, ) -> Result<SendableRecordBatchStream>
Execute a SQL query