Function differential_dataflow::collection::concatenate

source ·
pub fn concatenate<G, D, R, I>(
    scope: &mut G,
    iterator: I
) -> Collection<G, D, R>
where G: Scope, D: Data, R: Semigroup, I: IntoIterator<Item = Collection<G, D, R>>,
Expand description

Concatenates multiple collections.

This method has the effect of a sequence of calls to concat, but it does so in one operator rather than a chain of many operators.


use differential_dataflow::input::Input;

::timely::example(|scope| {

    let data = scope.new_collection_from(1 .. 10).1;

    let odds = data.filter(|x| x % 2 == 1);
    let evens = data.filter(|x| x % 2 == 0);

    differential_dataflow::collection::concatenate(scope, vec![odds, evens])