pub fn for_each_diff_pair<B, F>(batch: &B, on_diff_pair: F)where
B: BatchReader<Diff = Diff>,
B::Time: Copy,
B::ValOwn: 'static,
F: FnMut(&<B::KeyContainer as BatchContainer>::Owned, B::Time, DiffPair<B::ValOwn>),Expand description
Walks batch and invokes on_diff_pair for each DiffPair at each
(key, timestamp).
Within a key, diffs are partitioned by sign into retractions (befores) and
insertions (afters), sorted by timestamp, and zipped into DiffPairs via a
merge-join. Pairs are emitted in ascending timestamp order for a given key;
no ordering is guaranteed across keys. Callers are responsible for tracking
(key, timestamp) boundaries themselves if they need to detect groups
with more than one pair (e.g., for primary-key violation checks).