pub enum AggFn {
Count,
Sum,
Min,
Max,
Avg,
First,
Last,
}Expand description
Aggregation function type.
Variants§
Count
Count of non-null values.
Sum
Sum of values.
Min
Minimum value.
Max
Maximum value.
Avg
Average (mean) value.
First
First value — the value at the minimum timestamp.
When a timestamp column is available (the normal case), this scans for the row with the smallest timestamp. The data need not be sorted. Only falls back to array position if no timestamp column is present.
§Edge cases
- Empty bucket / all nulls: returns
None(NULL in SQL). - Ties (multiple rows with the same minimum timestamp): the first row encountered during the linear scan wins — i.e. the result is deterministic for a given input order but not stable across different physical orderings.
- Null timestamp: the row is skipped; only non-null timestamps participate in the min/max search.
Last
Last value — the value at the maximum timestamp.
When a timestamp column is available (the normal case), this scans for the row with the largest timestamp. The data need not be sorted. Only falls back to array position if no timestamp column is present.
§Edge cases
- Empty bucket / all nulls: returns
None(NULL in SQL). - Ties (multiple rows with the same maximum timestamp): the last row encountered during the linear scan wins — i.e. the result is deterministic for a given input order but not stable across different physical orderings.
- Null timestamp: the row is skipped; only non-null timestamps participate in the min/max search.
Trait Implementations§
impl Copy for AggFn
impl Eq for AggFn
impl StructuralPartialEq for AggFn
Auto Trait Implementations§
impl Freeze for AggFn
impl RefUnwindSafe for AggFn
impl Send for AggFn
impl Sync for AggFn
impl Unpin for AggFn
impl UnsafeUnpin for AggFn
impl UnwindSafe for AggFn
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.