pub trait CliSessionContext {
// Required methods
fn task_ctx(&self) -> Arc<TaskContext>;
fn session_state(&self) -> SessionState;
fn register_object_store(
&self,
url: &Url,
object_store: Arc<dyn ObjectStore>,
) -> Option<Arc<dyn ObjectStore + 'static>>;
fn register_table_options_extension_from_scheme(&self, scheme: &str);
fn execute_logical_plan<'life0, 'async_trait>(
&'life0 self,
plan: LogicalPlan,
) -> Pin<Box<dyn Future<Output = Result<DataFrame, DataFusionError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
The CLI session context trait provides a way to have a session context that can be used with datafusion’s CLI code.
Required Methods§
Sourcefn task_ctx(&self) -> Arc<TaskContext>
fn task_ctx(&self) -> Arc<TaskContext>
Get an atomic reference counted task context.
Sourcefn session_state(&self) -> SessionState
fn session_state(&self) -> SessionState
Get the session state.
Sourcefn register_object_store(
&self,
url: &Url,
object_store: Arc<dyn ObjectStore>,
) -> Option<Arc<dyn ObjectStore + 'static>>
fn register_object_store( &self, url: &Url, object_store: Arc<dyn ObjectStore>, ) -> Option<Arc<dyn ObjectStore + 'static>>
Register an object store with the session context.
Sourcefn register_table_options_extension_from_scheme(&self, scheme: &str)
fn register_table_options_extension_from_scheme(&self, scheme: &str)
Register table options extension from scheme.
Sourcefn execute_logical_plan<'life0, 'async_trait>(
&'life0 self,
plan: LogicalPlan,
) -> Pin<Box<dyn Future<Output = Result<DataFrame, DataFusionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_logical_plan<'life0, 'async_trait>(
&'life0 self,
plan: LogicalPlan,
) -> Pin<Box<dyn Future<Output = Result<DataFrame, DataFusionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a logical plan and return a DataFrame.