pub struct LazyView { /* private fields */ }Expand description
A lazy view that captures operations without executing them.
Implementations§
Source§impl LazyView
impl LazyView
Sourcepub fn mutate(self, assignments: Vec<(String, DExpr)>) -> Self
pub fn mutate(self, assignments: Vec<(String, DExpr)>) -> Self
Add or replace columns via expressions.
Sourcepub fn arrange(self, keys: Vec<ArrangeKey>) -> Self
pub fn arrange(self, keys: Vec<ArrangeKey>) -> Self
Sort rows by keys.
Sourcepub fn group_summarise(
self,
group_keys: Vec<String>,
aggregations: Vec<(String, TidyAgg)>,
) -> Self
pub fn group_summarise( self, group_keys: Vec<String>, aggregations: Vec<(String, TidyAgg)>, ) -> Self
Group by keys and aggregate.
Sourcepub fn join(
self,
right: LazyView,
on: Vec<(String, String)>,
kind: JoinType,
) -> Self
pub fn join( self, right: LazyView, on: Vec<(String, String)>, kind: JoinType, ) -> Self
Join with another LazyView.
Sourcepub fn collect(self) -> Result<TidyFrame, TidyError>
pub fn collect(self) -> Result<TidyFrame, TidyError>
Optimize and execute the plan, returning a TidyFrame.
Sourcepub fn optimized_plan(self) -> ViewNode
pub fn optimized_plan(self) -> ViewNode
Consume and return the optimized plan without executing (for testing).
Source§impl LazyView
impl LazyView
Sourcepub fn collect_batched(self) -> Result<TidyFrame, TidyError>
pub fn collect_batched(self) -> Result<TidyFrame, TidyError>
Optimize and execute the plan using batch processing.
This is an alternative to collect() that processes data in
2048-row batches, fusing chains of streamable operations
(Filter, Select, Mutate) into a single pass per batch.
Pipeline breakers (Arrange, GroupSummarise, Distinct, Join) cause full materialization at that point.
The output is identical to collect() – this is purely an
execution strategy optimization.
Auto Trait Implementations§
impl Freeze for LazyView
impl RefUnwindSafe for LazyView
impl !Send for LazyView
impl !Sync for LazyView
impl Unpin for LazyView
impl UnsafeUnpin for LazyView
impl UnwindSafe for LazyView
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
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>
Converts
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>
Converts
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 more