Trait differential_dataflow::operators::distinct::DistinctTotalCore
[−]
[src]
pub trait DistinctTotalCore<G: Scope, K: Data, R: Diff> where
G::Timestamp: TotalOrder + Lattice + Ord, { fn distinct_total_core(&self) -> Collection<G, K, isize>; }
Extension trait for the distinct_total_core
differential dataflow method.
Required Methods
fn distinct_total_core(&self) -> Collection<G, K, isize>
Applies distinct
to arranged data, and returns a collection of output data.
Examples
extern crate timely; extern crate differential_dataflow; use differential_dataflow::input::Input; use differential_dataflow::operators::arrange::Arrange; use differential_dataflow::operators::distinct::DistinctTotalCore; use differential_dataflow::trace::Trace; use differential_dataflow::trace::implementations::ord::OrdKeySpine; use differential_dataflow::hashable::OrdWrapper; fn main() { ::timely::example(|scope| { // wrap and order input, then group manually. scope.new_collection_from(1 .. 10u32).1 .map(|x| (OrdWrapper { item: x / 3 }, ())) .arrange(OrdKeySpine::new()) .distinct_total_core(); }); }