The runtime will need some way to distinguish Operators. An example is knowing that a sequence of Operators is of type Non-Blocking and thus can be fused/chained. A straightforward approach would be something like the following:
pub enum OperatorKind {
/// Map, Filter, Flatmap, ...
NonBlocking,
/// Rolling aggregations (sum, max, min)
NonBlockingPartialAggregator,
/// Streaming Windows
Blocking,
}
pub trait Operator: Send + Sized {
const KIND: OperatorKind;
}
The runtime will need some way to distinguish Operators. An example is knowing that a sequence of Operators is of type
Non-Blockingand thus can be fused/chained. A straightforward approach would be something like the following: