pub struct RowCompletenessTracker { /* private fields */ }Expand description
Full-stream count of records in which every field is present.
Completeness of a record is not recoverable from per-column null totals: those say how many nulls exist, not whether two of them shared a row. One counter fed whole rows answers it exactly, at any scale and regardless of sampling.
Implementations§
Source§impl RowCompletenessTracker
impl RowCompletenessTracker
Sourcepub fn observe(&mut self, had_null: bool)
pub fn observe(&mut self, had_null: bool)
Record one row. had_null is true when any of its fields was absent.
Sourcepub fn invalidate_completed_rows(&mut self)
pub fn invalidate_completed_rows(&mut self)
A column appeared after rows had already been counted, so every row counted so far is missing it and none of them was complete after all.
Sourcepub fn observe_aligned_columns(
&mut self,
columns: &[&[String]],
total_rows: usize,
)
pub fn observe_aligned_columns( &mut self, columns: &[&[String]], total_rows: usize, )
Count complete records across columns that are already row-aligned and hold every value, as the database and ad-hoc input paths do.
A row shorter than total_rows in some column is missing that field,
which is the same as holding a null there — the reading
StreamingColumnCollection::process_record gives ragged records.
pub fn merge(&mut self, other: &RowCompletenessTracker)
Sourcepub fn summary(&self) -> Option<RowCompletenessSummary>
pub fn summary(&self) -> Option<RowCompletenessSummary>
Exact complete-record counts, or None when no rows were observed.
Trait Implementations§
Source§impl Clone for RowCompletenessTracker
impl Clone for RowCompletenessTracker
Source§fn clone(&self) -> RowCompletenessTracker
fn clone(&self) -> RowCompletenessTracker
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more