pub trait Ring1Operator: Send {
// Required methods
fn process_batch(&mut self, batch: RecordBatch) -> Vec<RecordBatch>;
fn advance_watermark(&mut self, timestamp: i64) -> Vec<RecordBatch>;
fn output_schema(&self) -> SchemaRef;
fn checkpoint(&self) -> Vec<u8> ⓘ;
fn restore(&mut self, state: &[u8]);
}Expand description
A Ring 1 operator that processes batches at a pipeline boundary.
Implementations handle stateful operations like windowed aggregation,
stream joins, and sorting. The operator receives RecordBatches from
the upstream compiled segment and produces output batches for the
downstream segment.
Required Methods§
Sourcefn process_batch(&mut self, batch: RecordBatch) -> Vec<RecordBatch>
fn process_batch(&mut self, batch: RecordBatch) -> Vec<RecordBatch>
Processes an incoming RecordBatch from the upstream compiled segment.
Returns zero or more output batches. For windowed aggregation, output may be empty until a window trigger fires.
Sourcefn advance_watermark(&mut self, timestamp: i64) -> Vec<RecordBatch>
fn advance_watermark(&mut self, timestamp: i64) -> Vec<RecordBatch>
Advances the watermark — may trigger window emissions.
Returns any batches emitted by window closure or timer firing.
Sourcefn output_schema(&self) -> SchemaRef
fn output_schema(&self) -> SchemaRef
Returns the output schema for batches produced by this operator.
Sourcefn checkpoint(&self) -> Vec<u8> ⓘ
fn checkpoint(&self) -> Vec<u8> ⓘ
Serializes operator state for checkpointing.