Struct differential_dataflow::operators::arrange::Arranged
[−]
[src]
pub struct Arranged<G: Scope, K, V, R, T> where
G::Timestamp: Lattice + Ord,
T: TraceReader<K, V, G::Timestamp, R> + Clone, { pub stream: Stream<G, BatchWrapper<T::Batch>>, pub trace: T, }
An arranged collection of (K,V)
values.
An Arranged
allows multiple differential operators to share the resources (communication,
computation, memory) required to produce and maintain an indexed representation of a collection.
Fields
stream: Stream<G, BatchWrapper<T::Batch>>
A stream containing arranged updates.
This stream contains the same batches of updates the trace itself accepts, so there should be no additional overhead to receiving these records. The batches can be navigated just as the batches in the trace, by key and by value.
trace: T
A shared trace, updated by the Arrange
operator and readable by others.
Methods
impl<G: Scope, K, V, R, T> Arranged<G, K, V, R, T> where
G::Timestamp: Lattice + Ord,
T: TraceReader<K, V, G::Timestamp, R> + Clone,
[src]
G::Timestamp: Lattice + Ord,
T: TraceReader<K, V, G::Timestamp, R> + Clone,
pub fn enter<'a, TInner>(
&self,
child: &Child<'a, G, TInner>
) -> Arranged<Child<'a, G, TInner>, K, V, R, TraceEnter<K, V, G::Timestamp, R, T, TInner>> where
T::Batch: Clone,
K: 'static,
V: 'static,
G::Timestamp: Clone + Default + 'static,
TInner: Lattice + Timestamp + Clone + Default + 'static,
R: 'static,
[src]
&self,
child: &Child<'a, G, TInner>
) -> Arranged<Child<'a, G, TInner>, K, V, R, TraceEnter<K, V, G::Timestamp, R, T, TInner>> where
T::Batch: Clone,
K: 'static,
V: 'static,
G::Timestamp: Clone + Default + 'static,
TInner: Lattice + Timestamp + Clone + Default + 'static,
R: 'static,
Brings an arranged collection into a nested scope.
This method produces a proxy trace handle that uses the same backing data, but acts as if the timestamps have all been extended with an additional coordinate with the default value. The resulting collection does not vary with the new timestamp coordinate.
pub fn as_collection<D: Data, L>(&self, logic: L) -> Collection<G, D, R> where
R: Diff,
T::Batch: Clone + 'static,
K: Clone,
V: Clone,
L: Fn(&K, &V) -> D + 'static,
[src]
R: Diff,
T::Batch: Clone + 'static,
K: Clone,
V: Clone,
L: Fn(&K, &V) -> D + 'static,
Flattens the stream into a Collection
.
The underlying Stream<G, BatchWrapper<T::Batch>>
is a much more efficient way to access the data,
and this method should only be used when the data need to be transformed or exchanged, rather than
supplied as arguments to an operator using the same key-value structure.
Trait Implementations
impl<G: Scope, K, V, R, T> Clone for Arranged<G, K, V, R, T> where
G::Timestamp: Lattice + Ord,
T: TraceReader<K, V, G::Timestamp, R> + Clone,
[src]
G::Timestamp: Lattice + Ord,
T: TraceReader<K, V, G::Timestamp, R> + Clone,
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<G, K, V, R, T> Arrange<G, K, V, R, T> for Arranged<G, K, V, R, TraceAgent<K, V, G::Timestamp, R, T>> where
G: Scope,
G::Timestamp: Lattice,
R: Diff,
T: Trace<K, V, G::Timestamp, R> + Clone + 'static,
T::Batch: Batch<K, V, G::Timestamp, R>,
[src]
G: Scope,
G::Timestamp: Lattice,
R: Diff,
T: Trace<K, V, G::Timestamp, R> + Clone + 'static,
T::Batch: Batch<K, V, G::Timestamp, R>,
fn arrange(
&self,
_: T
) -> Arranged<G, K, V, R, TraceAgent<K, V, G::Timestamp, R, T>>
[src]
&self,
_: T
) -> Arranged<G, K, V, R, TraceAgent<K, V, G::Timestamp, R, T>>
Arranges a stream of (Key, Val)
updates by Key
. Accepts an empty instance of the trace type. Read more
impl<G: Scope, K: Data, V: Data, T1, R: Diff> GroupArranged<G, K, V, R> for Arranged<G, K, V, R, T1> where
G::Timestamp: Lattice + Ord,
T1: TraceReader<K, V, G::Timestamp, R> + Clone + 'static,
T1::Batch: BatchReader<K, V, G::Timestamp, R>,
[src]
G::Timestamp: Lattice + Ord,
T1: TraceReader<K, V, G::Timestamp, R> + Clone + 'static,
T1::Batch: BatchReader<K, V, G::Timestamp, R>,
fn group_arranged<L, V2, T2, R2>(
&self,
logic: L,
empty: T2
) -> Arranged<G, K, V2, R2, TraceAgent<K, V2, G::Timestamp, R2, T2>> where
V2: Data,
R2: Diff,
T2: Trace<K, V2, G::Timestamp, R2> + 'static,
T2::Batch: Batch<K, V2, G::Timestamp, R2>,
L: Fn(&K, &[(&V, R)], &mut Vec<(V2, R2)>) + 'static,
[src]
&self,
logic: L,
empty: T2
) -> Arranged<G, K, V2, R2, TraceAgent<K, V2, G::Timestamp, R2, T2>> where
V2: Data,
R2: Diff,
T2: Trace<K, V2, G::Timestamp, R2> + 'static,
T2::Batch: Batch<K, V2, G::Timestamp, R2>,
L: Fn(&K, &[(&V, R)], &mut Vec<(V2, R2)>) + 'static,
Applies group
to arranged data, and returns an arrangement of output data. Read more
impl<G, K, V, R, T> Join<G, K, V, R> for Arranged<G, K, V, R, T> where
G: Scope,
G::Timestamp: Lattice + Ord,
K: Data + Hashable,
V: Data,
R: Diff,
T: TraceReader<K, V, G::Timestamp, R> + Clone + 'static,
T::Batch: BatchReader<K, V, G::Timestamp, R> + 'static,
[src]
G: Scope,
G::Timestamp: Lattice + Ord,
K: Data + Hashable,
V: Data,
R: Diff,
T: TraceReader<K, V, G::Timestamp, R> + Clone + 'static,
T::Batch: BatchReader<K, V, G::Timestamp, R> + 'static,
fn join_map<V2: Data, R2: Diff, D: Data, L>(
&self,
other: &Collection<G, (K, V2), R2>,
logic: L
) -> Collection<G, D, <R as Mul<R2>>::Output> where
R: Mul<R2>,
<R as Mul<R2>>::Output: Diff,
L: Fn(&K, &V, &V2) -> D + 'static,
[src]
&self,
other: &Collection<G, (K, V2), R2>,
logic: L
) -> Collection<G, D, <R as Mul<R2>>::Output> where
R: Mul<R2>,
<R as Mul<R2>>::Output: Diff,
L: Fn(&K, &V, &V2) -> D + 'static,
Matches pairs (key,val1)
and (key,val2)
based on key
and then applies a function. Read more
fn semijoin<R2: Diff>(
&self,
other: &Collection<G, K, R2>
) -> Collection<G, (K, V), <R as Mul<R2>>::Output> where
R: Mul<R2>,
<R as Mul<R2>>::Output: Diff,
[src]
&self,
other: &Collection<G, K, R2>
) -> Collection<G, (K, V), <R as Mul<R2>>::Output> where
R: Mul<R2>,
<R as Mul<R2>>::Output: Diff,
Matches pairs (key, val)
and key
based on key
, producing the former with frequencies multiplied. Read more
fn antijoin<R2: Diff>(
&self,
other: &Collection<G, K, R2>
) -> Collection<G, (K, V), R> where
R: Mul<R2, Output = R>,
[src]
&self,
other: &Collection<G, K, R2>
) -> Collection<G, (K, V), R> where
R: Mul<R2, Output = R>,
Matches pairs (key, val)
and key
based on key
, discarding values in the first collection if their key is present in the second. Read more
fn join<V2: Data, R2: Diff>(
&self,
other: &Collection<G, (K, V2), R2>
) -> Collection<G, (K, V, V2), <R as Mul<R2>>::Output> where
R: Mul<R2>,
<R as Mul<R2>>::Output: Diff,
[src]
&self,
other: &Collection<G, (K, V2), R2>
) -> Collection<G, (K, V, V2), <R as Mul<R2>>::Output> where
R: Mul<R2>,
<R as Mul<R2>>::Output: Diff,
Matches pairs (key,val1)
and (key,val2)
based on key
and then applies a function. Read more
impl<G, K, V, R1, T1> JoinCore<G, K, V, R1> for Arranged<G, K, V, R1, T1> where
K: Ord,
G: Scope,
G::Timestamp: Lattice + Ord + Debug,
K: Debug + Eq + 'static,
V: Ord + Clone + Debug + 'static,
R1: Diff,
T1: TraceReader<K, V, G::Timestamp, R1> + Clone + 'static,
T1::Batch: BatchReader<K, V, G::Timestamp, R1> + 'static,
[src]
K: Ord,
G: Scope,
G::Timestamp: Lattice + Ord + Debug,
K: Debug + Eq + 'static,
V: Ord + Clone + Debug + 'static,
R1: Diff,
T1: TraceReader<K, V, G::Timestamp, R1> + Clone + 'static,
T1::Batch: BatchReader<K, V, G::Timestamp, R1> + 'static,
fn join_core<V2, T2, R2, I, L>(
&self,
other: &Arranged<G, K, V2, R2, T2>,
result: L
) -> Collection<G, I::Item, <R1 as Mul<R2>>::Output> where
V2: Ord + Clone + Debug + 'static,
T2: TraceReader<K, V2, G::Timestamp, R2> + Clone + 'static,
T2::Batch: BatchReader<K, V2, G::Timestamp, R2> + 'static,
R2: Diff,
R1: Mul<R2>,
<R1 as Mul<R2>>::Output: Diff,
I: IntoIterator,
I::Item: Data,
L: Fn(&K, &V, &V2) -> I + 'static,
[src]
&self,
other: &Arranged<G, K, V2, R2, T2>,
result: L
) -> Collection<G, I::Item, <R1 as Mul<R2>>::Output> where
V2: Ord + Clone + Debug + 'static,
T2: TraceReader<K, V2, G::Timestamp, R2> + Clone + 'static,
T2::Batch: BatchReader<K, V2, G::Timestamp, R2> + 'static,
R2: Diff,
R1: Mul<R2>,
<R1 as Mul<R2>>::Output: Diff,
I: IntoIterator,
I::Item: Data,
L: Fn(&K, &V, &V2) -> I + 'static,
Joins two arranged collections with the same key type. Read more
impl<G: Scope, K: Data, R: Diff, T1> CountTotalCore<G, K, R> for Arranged<G, K, (), R, T1> where
G::Timestamp: TotalOrder + Lattice + Ord,
T1: TraceReader<K, (), G::Timestamp, R> + Clone + 'static,
T1::Batch: BatchReader<K, (), G::Timestamp, R>,
[src]
G::Timestamp: TotalOrder + Lattice + Ord,
T1: TraceReader<K, (), G::Timestamp, R> + Clone + 'static,
T1::Batch: BatchReader<K, (), G::Timestamp, R>,
fn count_total_core(&self) -> Collection<G, (K, R), isize>
[src]
Applies group
to arranged data, and returns an arrangement of output data. Read more
impl<G: Scope, K: Data, R: Diff, T1> ThresholdTotal<G, K, R> for Arranged<G, K, (), R, T1> where
G::Timestamp: TotalOrder + Lattice + Ord,
T1: TraceReader<K, (), G::Timestamp, R> + Clone + 'static,
T1::Batch: BatchReader<K, (), G::Timestamp, R>,
[src]
G::Timestamp: TotalOrder + Lattice + Ord,
T1: TraceReader<K, (), G::Timestamp, R> + Clone + 'static,
T1::Batch: BatchReader<K, (), G::Timestamp, R>,
fn threshold_total<R2: Diff, F: Fn(R) -> R2 + 'static>(
&self,
thresh: F
) -> Collection<G, K, R2>
[src]
&self,
thresh: F
) -> Collection<G, K, R2>
Reduces the collection to one occurrence of each distinct element. Read more
fn distinct_total(&self) -> Collection<G, K, isize>
[src]
Reduces the collection to one occurrence of each distinct element. Read more