Skip to main content

Batcher

Trait Batcher 

Source
pub trait Batcher: PushInto<Self::Output> {
    type Output: Default;
    type Time: Timestamp;

    // Required methods
    fn new(logger: Option<Logger>, operator_id: usize) -> Self;
    fn seal(
        &mut self,
        upper: Antichain<Self::Time>,
    ) -> (Vec<Self::Output>, Description<Self::Time>);
    fn frontier(&mut self) -> AntichainRef<'_, Self::Time>;
}
Expand description

Functionality for collecting and batching updates.

Accepts containers of type Output via PushInto and produces output batches of the same type. Callers are responsible for converting raw input data into Output containers (e.g. using a chunker) before pushing into the batcher.

Required Associated Types§

Source

type Output: Default

Type produced by the batcher, and also the type it consumes.

Source

type Time: Timestamp

Times at which batches are formed.

Required Methods§

Source

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

Allocates a new empty batcher.

Source

fn seal( &mut self, upper: Antichain<Self::Time>, ) -> (Vec<Self::Output>, Description<Self::Time>)

Returns all updates not greater or equal to an element of upper, as a sorted and consolidated chain together with the description that bounds them.

The returned chain is suitable to hand directly to Builder::seal.

Source

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

Returns the lower envelope of contained update times.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<M> Batcher for differential_dataflow::trace::implementations::merge_batcher::MergeBatcher<M>
where M: Merger<Time: Timestamp>,

Source§

type Time = <M as Merger>::Time

Source§

type Output = <M as Merger>::Chunk

Source§

impl<U: Update<Time: Timestamp>> Batcher for differential_dataflow::columnar::batcher::MergeBatcher<U>