pub struct ZoneMap { /* private fields */ }Expand description
Reusable per-block zone map.
Implementations§
Source§impl ZoneMap
impl ZoneMap
Sourcepub fn with_capacity(expected_rows: usize) -> ZoneMap
pub fn with_capacity(expected_rows: usize) -> ZoneMap
Create a zone map sized for expected_rows. The bloom is tuned to
the row estimate; HLL is fixed-size (~16 KB).
Sourcepub fn observe_null(&mut self)
pub fn observe_null(&mut self)
Record a null observation. Does not touch the bloom / HLL since there is no key to hash.
Sourcepub fn total_count(&self) -> u64
pub fn total_count(&self) -> u64
Total rows observed (including nulls).
Sourcepub fn null_count(&self) -> u64
pub fn null_count(&self) -> u64
Rows observed as null.
Sourcepub fn non_null_count(&self) -> u64
pub fn non_null_count(&self) -> u64
Rows observed as non-null.
Sourcepub fn distinct_estimate(&self) -> u64
pub fn distinct_estimate(&self) -> u64
Estimated distinct non-null values.
Sourcepub fn bloom(&self) -> &BloomSegment
pub fn bloom(&self) -> &BloomSegment
Access the underlying bloom (for cross-structure helpers).
Sourcepub fn block_skip(&self, predicate: &ZonePredicate<'_>) -> ZoneDecision
pub fn block_skip(&self, predicate: &ZonePredicate<'_>) -> ZoneDecision
Decide whether to skip a block given a predicate.
Safe by default: when uncertain, returns ZoneDecision::MustRead.
Trait Implementations§
Source§impl HasBloom for ZoneMap
impl HasBloom for ZoneMap
Source§fn bloom_segment(&self) -> Option<&BloomSegment>
fn bloom_segment(&self) -> Option<&BloomSegment>
Reference to the bloom filter attached to this segment, if any.
Source§fn definitely_absent(&self, key: &[u8]) -> bool
fn definitely_absent(&self, key: &[u8]) -> bool
Fast-path negative check. Returns
true iff the bloom is present and
reports the key as absent.Source§impl IndexBase for ZoneMap
impl IndexBase for ZoneMap
Source§fn stats(&self) -> IndexStats
fn stats(&self) -> IndexStats
Current statistics (cardinality, estimated selectivity, memory).
Source§fn bloom(&self) -> Option<&BloomFilter>
fn bloom(&self) -> Option<&BloomFilter>
Optional bloom filter for fast negative lookups. Cross-structure
pruning relies on this.
Source§fn definitely_absent(&self, key_bytes: &[u8]) -> bool
fn definitely_absent(&self, key_bytes: &[u8]) -> bool
Returns
true iff the key is guaranteed to be absent from this
index. Default implementation consults IndexBase::bloom and falls
back to false when no bloom is available (meaning “don’t know —
caller must probe”). Read moreAuto Trait Implementations§
impl Freeze for ZoneMap
impl RefUnwindSafe for ZoneMap
impl Send for ZoneMap
impl Sync for ZoneMap
impl Unpin for ZoneMap
impl UnsafeUnpin 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
Mutably borrows from an owned value. Read more
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request