@@ -15,7 +15,9 @@ use crate::order::PartialOrder;
15
15
pub trait Timestamp : Clone +Eq +PartialOrder +Debug +Send +Any +ExchangeData +Hash +Ord {
16
16
/// A type summarizing action on a timestamp along a dataflow path.
17
17
type Summary : PathSummary < Self > + ' static ;
18
- /// A unique minimum value in our partial order, suitable as a default.
18
+ /// A unique minimum value in our partial order.
19
+ ///
20
+ /// This value will often be used as an initial value, and should be cheap to construct.
19
21
fn minimum ( ) -> Self ;
20
22
}
21
23
@@ -31,12 +33,14 @@ pub trait PathSummary<T> : Clone+'static+Eq+PartialOrder+Debug+Default {
31
33
/// in computation, uses this method and will drop messages with timestamps that when advanced
32
34
/// result in `None`. Ideally, all other timestamp manipulation should behave similarly.
33
35
///
34
- /// This summary's partial order is expected to be compatible with the partial order of [T],
35
- /// in the sense that if `s1.less_equal(s2)`, then ` s1.results_in(&t)` is less than or equal to
36
- /// `s2. results_in(&t )`.
36
+ /// This function must be monotonic increasing in both inputs.
37
+ /// If `s1.less_equal(& s2)` then for all `t` we have ` s1.results_in(&t).less_equal(&s2.results_in(&t))`.
38
+ /// If `t1.less_equal(&t2)` then for all `s` we have `s. results_in(&t1).less_equal(&s.results_in(&t2) )`.
37
39
///
38
40
/// Note that `Self::default()` is expected to behave as an "empty" or "noop" summary, such that
39
- /// `Self::default().results_in(&t) == Some(t)`.
41
+ /// `Self::default().results_in(&t) == Some(t)`. The default summary does not need to be a minimal
42
+ /// summary, in that summaries are technically permitted to walk timestamps backwards. Care should
43
+ /// be used when doing this to avoid potentially cyclic dataflows without strict timestamp advancement.
40
44
///
41
45
/// # Examples
42
46
/// ```
0 commit comments