pub struct ZoneMap { /* private fields */ }Expand description
A zone map containing statistics for a column. Each row of the zone map corresponds to a chunk of the column.
Note that it’s possible for the zone map to have no statistics.
Implementations§
Source§impl ZoneMap
impl ZoneMap
Sourcepub fn try_new(
column_dtype: DType,
array: StructArray,
stats: Arc<[Stat]>,
) -> VortexResult<Self>
pub fn try_new( column_dtype: DType, array: StructArray, stats: Arc<[Stat]>, ) -> VortexResult<Self>
Create ZoneMap of given column_dtype from given array. Validates that the array matches expected
structure for given list of stats.
Sourcepub fn new_unchecked(array: StructArray, stats: Arc<[Stat]>) -> Self
pub fn new_unchecked(array: StructArray, stats: Arc<[Stat]>) -> Self
Creates ZoneMap without validating return array against expected stats.
Sourcepub fn dtype_for_stats_table(
column_dtype: &DType,
present_stats: &[Stat],
) -> DType
pub fn dtype_for_stats_table( column_dtype: &DType, present_stats: &[Stat], ) -> DType
Sourcepub fn array(&self) -> &StructArray
pub fn array(&self) -> &StructArray
Returns the underlying StructArray backing the zone map
Sourcepub fn present_stats(&self) -> &Arc<[Stat]>
pub fn present_stats(&self) -> &Arc<[Stat]>
Returns the list of stats included in the zone map.
Sourcepub fn to_stats_set(&self, stats: &[Stat]) -> VortexResult<StatsSet>
pub fn to_stats_set(&self, stats: &[Stat]) -> VortexResult<StatsSet>
Returns an aggregated stats set for the table.
Sourcepub fn get_stat(&self, stat: Stat) -> VortexResult<Option<ArrayRef>>
pub fn get_stat(&self, stat: Stat) -> VortexResult<Option<ArrayRef>>
Returns the array for a given stat.
Sourcepub fn prune(&self, predicate: &ExprRef) -> VortexResult<Mask>
pub fn prune(&self, predicate: &ExprRef) -> VortexResult<Mask>
Apply a pruning predicate against the ZoneMap, yielding a mask indicating which zones can be pruned.
The expression provided should be the result of converting an existing VortexExpr via
checked_pruning_expr into a prunable
expression that can be evaluated on a zone map.
All zones where the predicate evaluates to true can be skipped entirely.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ZoneMap
impl !RefUnwindSafe for ZoneMap
impl Send for ZoneMap
impl Sync for ZoneMap
impl Unpin for ZoneMap
impl !UnwindSafe for ZoneMap
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
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>
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>
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