Function differential_dataflow::collection::concatenate
source · pub fn concatenate<G, D, R, C, I>(
scope: &mut G,
iterator: I,
) -> Collection<G, D, R, C>where
G: Scope,
D: Data,
R: Semigroup + 'static,
C: Container,
I: IntoIterator<Item = Collection<G, D, R, C>>,
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.
§Examples
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])
.assert_eq(&data);
});