TimelyDataflow / differential-dataflow

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

Introduce `IsZero` trait for `is_zero()` #503

Closed frankmcsherry closed 4 months ago

frankmcsherry commented 4 months ago

This extracts is_zero() from Semigroup, which now requires it instead. The reasoning is that while Semigroup<Rhs> can have multiple Rhs implementations, there cannot be multiple is_zero() implementations, and we want to avoid confusion there. In fact, it isn't especially clear what being a zero means for any other Rhs, and we don't really end up using is_zero() in support of semigroup actions as much as once accumulation has been accomplished, determining whether to discard the update or not.