pub enum PlanNode {
Scan {
path: PathBuf,
format: FileFormat,
projection: Option<Vec<String>>,
},
Filter {
input: Box<PlanNode>,
predicate: Expr,
},
Select {
input: Box<PlanNode>,
columns: Vec<String>,
},
WithColumn {
input: Box<PlanNode>,
name: String,
expr: Expr,
},
Limit {
input: Box<PlanNode>,
count: usize,
},
MaxScan {
input: Box<PlanNode>,
count: usize,
},
Join {
left: Box<PlanNode>,
right: Box<PlanNode>,
join_type: JoinType,
on: Vec<String>,
},
}Expand description
A node in the logical plan tree
Each node represents a single operation. Nodes form a tree where operations flow from leaves (scans) to the root (final output).
Variants§
Scan
Scan a file from disk
This is always a leaf node - the source of data
Fields
§
format: FileFormatFile format
Filter
Filter records by predicate
Only records where the predicate evaluates to true are kept
Select
Select/project specific columns
Reduces the output to only the specified columns
WithColumn
Add a computed column
Fields
Limit
Limit number of records
MaxScan
Maximum number of records to scan (before filtering)
This limits how many records are read from the source, regardless of how many pass filters. Useful for sampling large files without processing the entire dataset.
Join
Join two plans (future support)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PlanNode
impl RefUnwindSafe for PlanNode
impl Send for PlanNode
impl Sync for PlanNode
impl Unpin for PlanNode
impl UnsafeUnpin for PlanNode
impl UnwindSafe for PlanNode
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