Skip to content

Commit a263ae1

Browse files
Remove Hash from Timestamp (#713)
1 parent a34986d commit a263ae1

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

timely/src/dataflow/operators/aggregation/aggregate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub trait Aggregate<S: Scope, K: ExchangeData+Hash, V: ExchangeData> {
6767
hash: H) -> Stream<S, R> where S::Timestamp: Eq;
6868
}
6969

70-
impl<S: Scope, K: ExchangeData+Hash+Eq, V: ExchangeData> Aggregate<S, K, V> for Stream<S, (K, V)> {
70+
impl<S: Scope<Timestamp: ::std::hash::Hash>, K: ExchangeData+Hash+Eq, V: ExchangeData> Aggregate<S, K, V> for Stream<S, (K, V)> {
7171

7272
fn aggregate<R: Data, D: Default+'static, F: Fn(&K, V, &mut D)+'static, E: Fn(K, D)->R+'static, H: Fn(&K)->u64+'static>(
7373
&self,

timely/src/dataflow/operators/capability.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ impl<T: Timestamp> PartialOrder for Capability<T> {
205205
}
206206
}
207207

208-
impl<T: Timestamp> ::std::hash::Hash for Capability<T> {
208+
impl<T: Timestamp+::std::hash::Hash> ::std::hash::Hash for Capability<T> {
209209
fn hash<H: ::std::hash::Hasher>(&self, state: &mut H) {
210210
self.time.hash(state);
211211
}

timely/src/dataflow/operators/count.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub trait Accumulate<G: Scope, D: Data> {
4848
}
4949
}
5050

51-
impl<G: Scope, D: Data> Accumulate<G, D> for Stream<G, D> {
51+
impl<G: Scope<Timestamp: ::std::hash::Hash>, D: Data> Accumulate<G, D> for Stream<G, D> {
5252
fn accumulate<A: Data>(&self, default: A, logic: impl Fn(&mut A, &mut Vec<D>)+'static) -> Stream<G, A> {
5353

5454
let mut accums = HashMap::new();

timely/src/dataflow/operators/delay.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub trait Delay<G: Scope, D: Data> {
9494
fn delay_batch<L: FnMut(&G::Timestamp)->G::Timestamp+'static>(&self, func: L) -> Self;
9595
}
9696

97-
impl<G: Scope, D: Data> Delay<G, D> for Stream<G, D> {
97+
impl<G: Scope<Timestamp: ::std::hash::Hash>, D: Data> Delay<G, D> for Stream<G, D> {
9898
fn delay<L: FnMut(&D, &G::Timestamp)->G::Timestamp+'static>(&self, mut func: L) -> Self {
9999
let mut elements = HashMap::new();
100100
self.unary_notify(Pipeline, "Delay", vec![], move |input, output, notificator| {

timely/src/progress/timestamp.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
use std::fmt::Debug;
44
use std::any::Any;
55
use std::default::Default;
6-
use std::hash::Hash;
76

87
use crate::ExchangeData;
98
use crate::order::PartialOrder;
@@ -12,7 +11,7 @@ use crate::order::PartialOrder;
1211
///
1312
/// By implementing this trait, you promise that the type's [PartialOrder] implementation
1413
/// is compatible with [Ord], such that if `a.less_equal(b)` then `a <= b`.
15-
pub trait Timestamp: Clone+Eq+PartialOrder+Debug+Send+Any+ExchangeData+Hash+Ord {
14+
pub trait Timestamp: Clone+Eq+PartialOrder+Ord+Debug+Any+ExchangeData {
1615
/// A type summarizing action on a timestamp along a dataflow path.
1716
type Summary : PathSummary<Self> + 'static;
1817
/// A unique minimum value in our partial order.
@@ -22,7 +21,7 @@ pub trait Timestamp: Clone+Eq+PartialOrder+Debug+Send+Any+ExchangeData+Hash+Ord
2221
}
2322

2423
/// A summary of how a timestamp advances along a timely dataflow path.
25-
pub trait PathSummary<T> : Clone+'static+Eq+PartialOrder+Debug+Default {
24+
pub trait PathSummary<T> : Clone+Eq+PartialOrder+Debug+Default {
2625
/// Advances a timestamp according to the timestamp actions on the path.
2726
///
2827
/// The path may advance the timestamp sufficiently that it is no longer valid, for example if

0 commit comments

Comments
 (0)