pub enum QueryPlan {
Scan {
measurement: String,
tag_filters: Vec<TagFilter>,
projection: Vec<String>,
time_range: TimeRange,
field_predicates: Vec<FieldPredicate>,
namespace_id: Option<String>,
},
Aggregate {
source: Box<QueryPlan>,
functions: Vec<AggFn>,
group_by: Vec<String>,
estimated_cardinality: Option<usize>,
},
Downsample {
source: Box<QueryPlan>,
interval: Duration,
function: AggFn,
},
Limit {
source: Box<QueryPlan>,
limit: usize,
offset: usize,
},
Window {
source: Box<QueryPlan>,
functions: Vec<WindowFn>,
partition_by: Vec<String>,
value_column: String,
},
}Expand description
A logical query plan.
Describes what data to read and how to process it, without specifying the physical execution strategy.
Variants§
Scan
Scan a measurement with optional filters and projection.
Fields
§
field_predicates: Vec<FieldPredicate>Zone-map field predicates for late-materialisation row-group pruning. Each predicate compares a numeric column against a threshold; row groups whose per-block min/max stats rule out any match are skipped entirely.
Aggregate
Aggregate results from a scan.
Fields
Downsample
Downsample results into time buckets.
Fields
Limit
Limit the number of returned rows, optionally skipping some.
Fields
Window
Apply window functions that produce one output row per input row.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueryPlan
impl RefUnwindSafe for QueryPlan
impl Send for QueryPlan
impl Sync for QueryPlan
impl Unpin for QueryPlan
impl UnsafeUnpin for QueryPlan
impl UnwindSafe for QueryPlan
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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