pub enum LogicalPlan {
Scan {
source: DataFrame,
},
Filter {
input: Box<LogicalPlan>,
predicate: DExpr,
},
GroupBy {
input: Box<LogicalPlan>,
keys: Vec<String>,
},
Aggregate {
input: Box<LogicalPlan>,
keys: Vec<String>,
aggs: Vec<(String, DExpr)>,
},
Project {
input: Box<LogicalPlan>,
columns: Vec<String>,
},
InnerJoin {
left: Box<LogicalPlan>,
right: Box<LogicalPlan>,
left_on: String,
right_on: String,
},
LeftJoin {
left: Box<LogicalPlan>,
right: Box<LogicalPlan>,
left_on: String,
right_on: String,
},
CrossJoin {
left: Box<LogicalPlan>,
right: Box<LogicalPlan>,
},
}Expand description
A logical query plan node.
Variants§
Scan
Scan a source DataFrame.
Filter
Filter rows by predicate.
GroupBy
Group by one or more columns.
Aggregate
Aggregate with named expressions.
Project
Select/project specific columns.
InnerJoin
Inner join: rows matching on both sides.
LeftJoin
Left join: all left rows, matching right rows or null.
CrossJoin
Cross join: cartesian product.
Implementations§
Source§impl LogicalPlan
impl LogicalPlan
Sourcepub fn referenced_columns(&self) -> Vec<String>
pub fn referenced_columns(&self) -> Vec<String>
Collect the column names referenced by this plan (for pruning).
Trait Implementations§
Source§impl Clone for LogicalPlan
impl Clone for LogicalPlan
Source§fn clone(&self) -> LogicalPlan
fn clone(&self) -> LogicalPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LogicalPlan
impl RefUnwindSafe for LogicalPlan
impl Send for LogicalPlan
impl Sync for LogicalPlan
impl Unpin for LogicalPlan
impl UnsafeUnpin for LogicalPlan
impl UnwindSafe for LogicalPlan
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> 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>
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