Trait 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§