pub struct DistinctState { /* private fields */ }Expand description
Streaming distinct over TermBatch frames.
The seen-set lives on this value so later batches can drop rows that duplicated an earlier batch. Output rows are gathered from the current batch only.
Implementations§
Source§impl DistinctState
impl DistinctState
Sourcepub fn filter_batch(
&mut self,
batch: &TermBatch,
key_cols: &[&TermColumn],
) -> Result<TermBatch, ExecError>
pub fn filter_batch( &mut self, batch: &TermBatch, key_cols: &[&TermColumn], ) -> Result<TermBatch, ExecError>
Keep first-seen rows of batch keyed by key_cols (same length as
Self::new). Other batch columns are carried via TermColumn::gather_take.
Sourcepub fn estimated_bytes(&self) -> u64
pub fn estimated_bytes(&self) -> u64
Approximate RAM for the seen-set (keys plus HashSet overhead).
Sourcepub fn remember_keys(
&mut self,
key_cols: &[&TermColumn],
) -> Result<(), ExecError>
pub fn remember_keys( &mut self, key_cols: &[&TermColumn], ) -> Result<(), ExecError>
Insert every key in key_cols without gathering output rows.
Sourcepub fn seen_key_batch(&self) -> Result<TermBatch, ExecError>
pub fn seen_key_batch(&self) -> Result<TermBatch, ExecError>
Seen keys as a TermId batch (n_keys columns). Empty projection: one
zero-width row if the empty mapping was seen, else no rows.
Auto Trait Implementations§
impl Freeze for DistinctState
impl RefUnwindSafe for DistinctState
impl Send for DistinctState
impl Sync for DistinctState
impl Unpin for DistinctState
impl UnsafeUnpin for DistinctState
impl UnwindSafe for DistinctState
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