pub enum Context {
Local(SessionContext),
Remote(BallistaContext),
}Expand description
The CLI supports using a local DataFusion context or a distributed BallistaContext
Variants§
Local(SessionContext)
In-process execution with DataFusion
Remote(BallistaContext)
Distributed execution with Ballista (if available)
Implementations§
Source§impl Context
impl Context
Sourcepub async fn new_remote(host: &str, port: u16) -> Result<Context>
pub async fn new_remote(host: &str, port: u16) -> Result<Context>
create a new remote context with given host and port
Sourcepub async fn new_local(config: &SessionConfig) -> Context
pub async fn new_local(config: &SessionConfig) -> Context
create a local context using the given config
Sourcepub async fn sql(&mut self, sql: &str) -> Result<Arc<DataFrame>>
pub async fn sql(&mut self, sql: &str) -> Result<Arc<DataFrame>>
execute an SQL statement against the context
pub async fn exec_files(&mut self, files: Vec<String>)
pub fn format_execution_config(&self) -> Option<Vec<String>>
pub fn format_physical_optimizers(&self) -> Option<Vec<String>>
Auto Trait Implementations§
impl Freeze for Context
impl !RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more