pub enum ViewNode {
Scan {
df: Rc<DataFrame>,
},
Filter {
input: Box<ViewNode>,
predicate: DExpr,
},
Select {
input: Box<ViewNode>,
columns: Vec<String>,
},
Mutate {
input: Box<ViewNode>,
assignments: Vec<(String, DExpr)>,
},
Arrange {
input: Box<ViewNode>,
keys: Vec<ArrangeKey>,
},
GroupSummarise {
input: Box<ViewNode>,
group_keys: Vec<String>,
aggregations: Vec<(String, TidyAgg)>,
},
StreamingGroupSummarise {
input: Box<ViewNode>,
group_keys: Vec<String>,
aggregations: Vec<(String, StreamingAgg)>,
},
Distinct {
input: Box<ViewNode>,
columns: Vec<String>,
},
Join {
left: Box<ViewNode>,
right: Box<ViewNode>,
on: Vec<(String, String)>,
kind: JoinType,
},
}Expand description
A node in the lazy evaluation tree.
Variants§
Scan
Leaf: scan a base DataFrame.
Filter
Filter rows by predicate.
Select
Project to subset of columns.
Mutate
Add/replace columns via expressions.
Arrange
Sort by keys.
GroupSummarise
Group + summarise (pipeline breaker).
StreamingGroupSummarise
v3 Phase 6: streaming-friendly group + summarise. Produced by
the lazy optimizer (annotate_streamable_summarise) when every
aggregation is one of {Count, Sum, Mean, Min, Max, Var, Sd}. At
execution this dispatches to TidyView::summarise_streaming,
avoiding the per-group Vec<usize> materialisation.
Distinct
Distinct on columns.
Join
Join two inputs.
Implementations§
Source§impl ViewNode
impl ViewNode
Sourcepub fn count_filters(&self) -> usize
pub fn count_filters(&self) -> usize
Count the number of Filter nodes in the tree.
Sourcepub fn is_filter_on_scan(&self) -> bool
pub fn is_filter_on_scan(&self) -> bool
Check if the immediate child (input) of the outermost node is a Scan. Useful for verifying predicate pushdown moved a filter near the scan.
Sourcepub fn innermost(&self) -> &ViewNode
pub fn innermost(&self) -> &ViewNode
Return the innermost node (the leaf Scan) by walking input chains.
Sourcepub fn node_kinds(&self) -> Vec<&'static str>
pub fn node_kinds(&self) -> Vec<&'static str>
Walk the plan tree depth-first and collect node kinds top-down.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ViewNode
impl RefUnwindSafe for ViewNode
impl !Send for ViewNode
impl !Sync for ViewNode
impl Unpin for ViewNode
impl UnsafeUnpin for ViewNode
impl UnwindSafe for ViewNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more