Skip to main content

OperatorChainFactory

Trait OperatorChainFactory 

Source
pub trait OperatorChainFactory: Send + Sync {
    // Required methods
    fn create_chain(&self) -> Vec<Box<dyn PushOperator>>;
    fn has_pipeline_breakers(&self) -> bool;
    fn chain_length(&self) -> usize;
}
Expand description

Factory for creating per-worker operator chains.

Each worker needs its own operator instances since operators may have internal state (e.g., aggregation accumulators).

Required Methods§

Source

fn create_chain(&self) -> Vec<Box<dyn PushOperator>>

Creates a new operator chain for a worker.

Each call should return fresh operator instances.

Source

fn has_pipeline_breakers(&self) -> bool

Returns whether the chain contains pipeline breakers.

Pipeline breakers (Sort, Aggregate, Distinct) require a merge phase.

Source

fn chain_length(&self) -> usize

Returns the number of operators in the chain.

Implementors§