Trait differential_dataflow::trace::Batcher

source ·
pub trait Batcher {
    type Input;
    type Output;
    type Time: Timestamp;

    // Required methods
    fn new(
        logger: Option<Logger<DifferentialEvent, WorkerIdentifier>>,
        operator_id: usize
    ) -> Self;
    fn push_batch(&mut self, batch: RefOrMut<'_, Self::Input>);
    fn seal<B: Builder<Input = Self::Output, Time = Self::Time>>(
        &mut self,
        upper: Antichain<Self::Time>
    ) -> B::Output;
    fn frontier(&mut self) -> AntichainRef<'_, Self::Time>;
}
Expand description

Functionality for collecting and batching updates.

Required Associated Types§

source

type Input

Type pushed into the batcher.

source

type Output

Type produced by the batcher.

source

type Time: Timestamp

Times at which batches are formed.

Required Methods§

source

fn new( logger: Option<Logger<DifferentialEvent, WorkerIdentifier>>, operator_id: usize ) -> Self

Allocates a new empty batcher.

source

fn push_batch(&mut self, batch: RefOrMut<'_, Self::Input>)

Adds an unordered batch of elements to the batcher.

source

fn seal<B: Builder<Input = Self::Output, Time = Self::Time>>( &mut self, upper: Antichain<Self::Time> ) -> B::Output

Returns all updates not greater or equal to an element of upper.

source

fn frontier(&mut self) -> AntichainRef<'_, Self::Time>

Returns the lower envelope of contained update times.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<K, V, T, D> Batcher for MergeBatcher<K, V, T, D>
where K: Ord + Clone, V: Ord + Clone, T: Timestamp, D: Semigroup,

§

type Input = Vec<((K, V), T, D)>

§

type Output = ((K, V), T, D)

§

type Time = T

source§

impl<K, V, T, D> Batcher for ColumnatedMergeBatcher<K, V, T, D>
where K: Columnation + Ord + Clone + 'static, V: Columnation + Ord + Clone + 'static, T: Columnation + Timestamp + 'static, D: Columnation + Semigroup + 'static,

§

type Input = Vec<((K, V), T, D)>

§

type Output = ((K, V), T, D)

§

type Time = T