pub struct StatsAccumulator { /* private fields */ }Expand description
Accumulates statistics for a column.
TODO(ngates): we should make it such that the stats table stores a mirror of the DType
underneath each stats column. For example, min: i32 for an i32 array.
Or min: {a: i32, b: i32} for a struct array of type {a: i32, b: i32}.
See: https://github.com/spiraldb/vortex/issues/1835
Implementations§
Source§impl StatsAccumulator
impl StatsAccumulator
pub fn new(dtype: DType, stats: Vec<Stat>) -> Self
pub fn push_chunk(&mut self, array: &ArrayData) -> VortexResult<()>
Sourcepub fn as_stats_table(&mut self) -> VortexResult<Option<StatsTable>>
pub fn as_stats_table(&mut self) -> VortexResult<Option<StatsTable>>
Finishes the accumulator into a StatsTable.
Returns None if none of the requested statistics can be computed, for example they are
not applicable to the column’s data type.
Auto Trait Implementations§
impl Freeze for StatsAccumulator
impl !RefUnwindSafe for StatsAccumulator
impl Send for StatsAccumulator
impl !Sync for StatsAccumulator
impl Unpin for StatsAccumulator
impl !UnwindSafe for StatsAccumulator
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> 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