pub struct OxideFrame { /* private fields */ }Expand description
A lazily built query over one session, collected with Self::collect.
Implementations§
Source§impl OxideFrame
impl OxideFrame
Sourcepub fn into_inner(self) -> DataFrame
pub fn into_inner(self) -> DataFrame
The underlying DataFusion DataFrame, for verbs this API does not wrap.
Sourcepub fn filter(self, predicate: Expr) -> Result<Self, EngineError>
pub fn filter(self, predicate: Expr) -> Result<Self, EngineError>
Keeps rows matching predicate (e.g. col("k").gt_eq(lit(2))).
Sourcepub fn select(self, columns: &[&str]) -> Result<Self, EngineError>
pub fn select(self, columns: &[&str]) -> Result<Self, EngineError>
Keeps the named columns, in order.
Sourcepub fn alias(self, name: &str) -> Result<Self, EngineError>
pub fn alias(self, name: &str) -> Result<Self, EngineError>
Renames the frame’s table qualifier (required to self-join a table).
Sourcepub fn join(
self,
right: OxideFrame,
left_key: &str,
right_key: &str,
) -> Result<Self, EngineError>
pub fn join( self, right: OxideFrame, left_key: &str, right_key: &str, ) -> Result<Self, EngineError>
Inner-joins right on left_key = right_key.
Sourcepub fn aggregate(
self,
group_by: Vec<Expr>,
aggregates: Vec<Expr>,
) -> Result<Self, EngineError>
pub fn aggregate( self, group_by: Vec<Expr>, aggregates: Vec<Expr>, ) -> Result<Self, EngineError>
Groups by group_by and computes aggregates
(e.g. aggregate(vec![col("k")], vec![sum(col("v"))])).
Sourcepub fn sort(self, exprs: Vec<SortExpr>) -> Result<Self, EngineError>
pub fn sort(self, exprs: Vec<SortExpr>) -> Result<Self, EngineError>
Sorts by expr (e.g. col("d").sort(true, false) for ascending).
Sourcepub fn limit(self, n: usize) -> Result<Self, EngineError>
pub fn limit(self, n: usize) -> Result<Self, EngineError>
Keeps at most n rows.
Sourcepub fn vector_distance(
self,
column: &str,
query: &[f32],
metric: DistanceMetric,
output: &str,
) -> Result<Self, EngineError>
pub fn vector_distance( self, column: &str, query: &[f32], metric: DistanceMetric, output: &str, ) -> Result<Self, EngineError>
Appends output — the metric distance between the vector column
column (FixedSizeList<Float32>) and query — as a nullable
Float32 column. Plans the l2_distance / cosine_distance UDF, so
a GPU-target session lowers it to GpuVectorDistanceExec.
Sourcepub async fn explain(&self) -> Result<String, EngineError>
pub async fn explain(&self) -> Result<String, EngineError>
The indented physical plan, with placement tags on Gpu*Exec nodes.
Sourcepub async fn collect(self) -> Result<Vec<RecordBatch>, EngineError>
pub async fn collect(self) -> Result<Vec<RecordBatch>, EngineError>
Executes the frame and returns every batch.
Sourcepub async fn show(self) -> Result<(), EngineError>
pub async fn show(self) -> Result<(), EngineError>
Executes the frame and prints it as a table.
Trait Implementations§
Source§impl Clone for OxideFrame
impl Clone for OxideFrame
Source§impl Debug for OxideFrame
impl Debug for OxideFrame
Auto Trait Implementations§
impl !RefUnwindSafe for OxideFrame
impl !UnwindSafe for OxideFrame
impl Freeze for OxideFrame
impl Send for OxideFrame
impl Sync for OxideFrame
impl Unpin for OxideFrame
impl UnsafeUnpin for OxideFrame
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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