TimelyDataflow / differential-dataflow

An implementation of differential dataflow using timely dataflow on Rust.
MIT License
2.53k stars 182 forks source link

Introduce trait constraints; simplify elsewhere #445

Closed frankmcsherry closed 8 months ago

frankmcsherry commented 8 months ago

This PR introduces constraints to the Time and Diff associated types for TraceReader, BatchReader, and Cursor. They look roughly like so:

    /// Timestamps associated with updates
    type Time: Timestamp + Lattice + Ord + Clone;
    /// Associated update.
    type Diff: Semigroup;

These constraints are .. pretty much the rule now, in use of differential dataflow. Users end up needing to write where clauses with much of this information, even though no one expects to use these things in the absence of these properties.