Trait differential_dataflow::operators::group::Group
[−]
[src]
pub trait Group<G: Scope, K: Data, V: Data> where G::Timestamp: LeastUpperBound { fn group<L, V2: Data>(&self, logic: L) -> Collection<G, (K, V2)> where L: Fn(&K, &mut CollectionIterator<DifferenceIterator<V>>, &mut Vec<(V2, Delta)>) + 'static; }
Extension trait for the group
differential dataflow method
Required Methods
fn group<L, V2: Data>(&self, logic: L) -> Collection<G, (K, V2)> where L: Fn(&K, &mut CollectionIterator<DifferenceIterator<V>>, &mut Vec<(V2, Delta)>) + 'static
Groups records by their first field, and applies reduction logic to the associated values.
It would be nice for this to be generic over possible arrangements of data, but it seems that Rust
ICEs when I try this. I'm not exactly sure how one would specify the arrangement (the type is used
in logic
, by way of its associated iterator types, but not clearly enough to drive type inference),
but we don't have that problem yet anyhow.
In any case, it would be great if the same implementation could handle (K,V)
pairs and K
elements
treated as (K, ())
pairs.
Implementors
impl<G: Scope, K: Data + Default, V: Data + Default> Group<G, K, V> for Collection<G, (K, V)> where G::Timestamp: LeastUpperBound