pub struct SchemaStabilityTracker { /* private fields */ }Expand description
Tracks consecutive rows where the schema (column types) has not changed.
Used by engines to implement SchemaStable stop conditions.
Accepts a fingerprint (hash) of the column types and accumulates rows across chunks. When the accumulated stable-row count reaches the threshold, the tracker signals that profiling may stop.
Implementations§
Source§impl SchemaStabilityTracker
impl SchemaStabilityTracker
Sourcepub fn from_condition(condition: &StopCondition) -> Option<Self>
pub fn from_condition(condition: &StopCondition) -> Option<Self>
Create a tracker for the given threshold. Returns None if no
SchemaStable condition is present.
Sourcepub fn update(&mut self, fingerprint: u64, chunk_rows: u64) -> bool
pub fn update(&mut self, fingerprint: u64, chunk_rows: u64) -> bool
Update with the current schema fingerprint and the number of rows in
the chunk. Returns true when the accumulated stable-row count reaches
the threshold.
Sourcepub fn truncation_reason(&self) -> TruncationReason
pub fn truncation_reason(&self) -> TruncationReason
The truncation reason when schema stability is reached.
Auto Trait Implementations§
impl Freeze for SchemaStabilityTracker
impl RefUnwindSafe for SchemaStabilityTracker
impl Send for SchemaStabilityTracker
impl Sync for SchemaStabilityTracker
impl Unpin for SchemaStabilityTracker
impl UnsafeUnpin for SchemaStabilityTracker
impl UnwindSafe for SchemaStabilityTracker
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