fn sum_signed_int_counted<'a, I, N>(datums: I, narrow: N) -> Datum<'a>Expand description
Count-aware signed-integer sum. Accumulates Σ value·diff in i128, which
matches the width of the dataflow’s Accum::SimpleNumber accumulator (see
build_accumulable and finalize_accum in mz_compute::render::reduce);
narrow then reproduces that variant’s finalize_accum arm. Unlike
expand_counts, this consumes the multiplicity directly, so it is linear in
the number of distinct values and correct for negative diffs (retractions),
which expand_counts would silently drop.
Returns Datum::Null when no non-null value was accumulated, matching
finalize_accum’s null handling: its is_zero check on SimpleNumber
requires both a zero running sum and a zero non-null count.