Skip to main content

expand_counts

Function expand_counts 

Source
fn expand_counts<'a, I>(datums: I) -> impl Iterator<Item = Datum<'a>>
where I: IntoIterator<Item = (Datum<'a>, Diff)>,
Expand description

Expands an iterator of (datum, diff) into one datum per unit of diff.

A non-positive diff contributes no copies. This is used by aggregates that are sensitive to multiplicity (e.g. sum), to recover a flat datum stream from the count-aware surface.