pub struct RowUniquenessTracker { /* private fields */ }Expand description
Full-stream row-duplicate tracking with bounded memory.
Every record’s fields are folded into a canonical length-prefixed
signature and fed to a CardinalityEstimator: duplicates are counted
exactly while the distinct-row signatures fit the estimator’s exact set,
and estimated (flagged approximate) once it spills to its HLL sketch.
Unlike the per-column reservoirs, this sees whole rows — including
null-like values — so the count is row-aligned by construction.
Implementations§
Source§impl RowUniquenessTracker
impl RowUniquenessTracker
pub fn observe(&mut self, signature: String)
pub fn rows_seen(&self) -> usize
Sourcepub fn duplicate_rows(&self) -> usize
pub fn duplicate_rows(&self) -> usize
Rows minus distinct rows; exact until the estimator spills.
pub fn is_approximate(&self) -> bool
pub fn merge(&mut self, other: &RowUniquenessTracker)
pub fn memory_usage_bytes(&self) -> usize
Sourcepub fn summary(&self) -> Option<RowDuplicateSummary>
pub fn summary(&self) -> Option<RowDuplicateSummary>
Summary for quality metrics, or None when no rows were observed
(e.g. an engine that never fed whole records through this tracker).
Trait Implementations§
Source§impl Clone for RowUniquenessTracker
impl Clone for RowUniquenessTracker
Source§fn clone(&self) -> RowUniquenessTracker
fn clone(&self) -> RowUniquenessTracker
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RowUniquenessTracker
impl Debug for RowUniquenessTracker
Source§impl Default for RowUniquenessTracker
impl Default for RowUniquenessTracker
Source§fn default() -> RowUniquenessTracker
fn default() -> RowUniquenessTracker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RowUniquenessTracker
impl RefUnwindSafe for RowUniquenessTracker
impl Send for RowUniquenessTracker
impl Sync for RowUniquenessTracker
impl Unpin for RowUniquenessTracker
impl UnsafeUnpin for RowUniquenessTracker
impl UnwindSafe for RowUniquenessTracker
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