pub struct OxideSession { /* private fields */ }Expand description
An OxideLake session.
Implementations§
Source§impl OxideSession
impl OxideSession
Sourcepub fn local() -> Result<Self, EngineError>
pub fn local() -> Result<Self, EngineError>
Creates an embedded session: Parquet pruning on, the local object store registered, the SQL UDFs, and the placement rule targeting the detected backend.
Sourcepub fn local_with_target(target: BackendKind) -> Result<Self, EngineError>
pub fn local_with_target(target: BackendKind) -> Result<Self, EngineError>
An embedded session whose placement rule targets target instead of
the detected backend. Placement is a planning decision: operators still
select the real local backend at execute() time and fall back to the
CPU reference, so planning for an absent GPU is safe — it is exactly
what cluster executors do with the scheduler’s plans.
Sourcepub async fn connect(scheduler_url: &str) -> Result<Self, EngineError>
pub async fn connect(scheduler_url: &str) -> Result<Self, EngineError>
Connects to a Ballista scheduler (df://host:port). The session carries
OxideLake’s plan codec so Gpu*Exec nodes survive the trip to executors,
and the SQL UDFs so queries plan client-side; placement itself happens
on the scheduler.
Sourcepub fn mode(&self) -> &SessionMode
pub fn mode(&self) -> &SessionMode
The execution mode.
Sourcepub fn ctx(&self) -> &SessionContext
pub fn ctx(&self) -> &SessionContext
The underlying DataFusion context.
Sourcepub fn telemetry(&self) -> &Arc<TelemetryHub> ⓘ
pub fn telemetry(&self) -> &Arc<TelemetryHub> ⓘ
The telemetry hub for this session (local process only).
Sourcepub async fn sql(&self, query: &str) -> Result<DataFrame, EngineError>
pub async fn sql(&self, query: &str) -> Result<DataFrame, EngineError>
Plans a SQL statement into a lazily executed DataFrame.
Sourcepub async fn register_parquet(
&self,
name: &str,
path: &str,
) -> Result<(), EngineError>
pub async fn register_parquet( &self, name: &str, path: &str, ) -> Result<(), EngineError>
Registers a Parquet file or directory as name.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for OxideSession
impl !UnwindSafe for OxideSession
impl Freeze for OxideSession
impl Send for OxideSession
impl Sync for OxideSession
impl Unpin for OxideSession
impl UnsafeUnpin for OxideSession
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request