Trait datafusion_cli::cli_context::CliSessionContext

source ·
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§

source

fn task_ctx(&self) -> Arc<TaskContext>

Get an atomic reference counted task context.

source

fn session_state(&self) -> SessionState

Get the session state.

source

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.

source

fn register_table_options_extension_from_scheme(&self, scheme: &str)

Register table options extension from scheme.

source

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.

Implementations on Foreign Types§

source§

impl CliSessionContext for SessionContext

source§

fn task_ctx(&self) -> Arc<TaskContext>

source§

fn session_state(&self) -> SessionState

source§

fn register_object_store( &self, url: &Url, object_store: Arc<dyn ObjectStore>, ) -> Option<Arc<dyn ObjectStore + 'static>>

source§

fn register_table_options_extension_from_scheme(&self, scheme: &str)

source§

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,

Implementors§