pub enum AggValueState {
Count(u64),
Sum(Value),
Min(Value),
Max(Value),
Avg {
sum: Value,
count: u64,
},
Collect(Vec<Value>),
StdDev {
sum: f64,
sum_sq: f64,
count: u64,
},
Variance {
sum: f64,
sum_sq: f64,
count: u64,
},
Percentile {
values: Vec<f64>,
percentile: f64,
},
CountIf(u64),
StringAgg {
pieces: Vec<String>,
delimiter: String,
},
}Expand description
State for aggregate function computation over Values.
Variants§
Count(u64)
Sum(Value)
Min(Value)
Max(Value)
Avg
Collect(Vec<Value>)
StdDev
Variance
Percentile
Percentile state — collects all non-null values for percentile computation.
CountIf(u64)
COUNT_IF state — counts rows where the condition evaluated to TRUE.
StringAgg
STRING_AGG state — collects string pieces to be concatenated.
Implementations§
Source§impl AggValueState
impl AggValueState
Sourcepub fn new(func: &AggregateFunction) -> Self
pub fn new(func: &AggregateFunction) -> Self
Create a new initial state for the given aggregate function.
Trait Implementations§
Source§impl Clone for AggValueState
impl Clone for AggValueState
Source§fn clone(&self) -> AggValueState
fn clone(&self) -> AggValueState
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 AggValueState
impl RefUnwindSafe for AggValueState
impl Send for AggValueState
impl Sync for AggValueState
impl Unpin for AggValueState
impl UnsafeUnpin for AggValueState
impl UnwindSafe for AggValueState
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> 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