Skip to main content

extract

Function extract 

Source
pub fn extract<D, T, R, Ch>(
    source: &Ch,
    position: &mut usize,
    upper: AntichainRef<'_, T>,
    frontier: &mut Antichain<T>,
    keep: &mut Ch,
    ship: &mut Ch,
)
where D: Columnar, for<'a> Ref<'a, D>: Copy + Ord, T: Columnar + Default + Clone + PartialOrder, for<'a> Ref<'a, T>: Copy + Ord, R: Columnar + Default + Semigroup + for<'a> Semigroup<Ref<'a, R>>, Ch: MergeChunk<(D, T, R)>,
Expand description

Partition records of source starting at *position into keep (times beyond upper, retained for the next round) and ship (times not beyond upper, sealed into the output batch). Updates frontier with the times of kept records.

The caller invokes extract repeatedly until *position >= source.len(), swapping out a full output buffer between calls. This shape exists because the framework only checks at_capacity() between calls, so without an inner-loop yield a single call could quietly produce oversized output chunks.