pub enum QueryOperation {
Scan {
table: String,
estimated_rows: usize,
},
Filter {
predicate: String,
selectivity: f64,
},
Join {
left_cost: f64,
right_cost: f64,
join_type: JoinType,
},
Aggregate {
group_by: Vec<String>,
},
Sort {
columns: Vec<String>,
},
Limit {
count: usize,
},
Project {
columns: Vec<String>,
},
}Expand description
A single logical query operation. Each variant carries the data the optimizer needs to estimate cost, reorder steps, and select join strategies.
Variants§
Scan
Full table scan; estimated_rows is the table’s row count.
Filter
Predicate filter; selectivity (0.0–1.0) is the fraction of rows that pass.
Join
Join of two inputs; left_cost/right_cost are estimated row counts
of the left and right inputs. The optimizer may override join_type.
Aggregate
Aggregation; group_by lists the grouping columns.
Sort
Sort by the given columns.
Limit
Limit to at most count rows.
Project
Column projection.
Trait Implementations§
Source§impl Clone for QueryOperation
impl Clone for QueryOperation
Source§fn clone(&self) -> QueryOperation
fn clone(&self) -> QueryOperation
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 moreSource§impl Debug for QueryOperation
impl Debug for QueryOperation
Source§impl PartialEq for QueryOperation
impl PartialEq for QueryOperation
Source§fn eq(&self, other: &QueryOperation) -> bool
fn eq(&self, other: &QueryOperation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for QueryOperation
Auto Trait Implementations§
impl Freeze for QueryOperation
impl RefUnwindSafe for QueryOperation
impl Send for QueryOperation
impl Sync for QueryOperation
impl Unpin for QueryOperation
impl UnsafeUnpin for QueryOperation
impl UnwindSafe for QueryOperation
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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