Expand description
§LAG/LEAD Operator
Per-row analytic window functions for streaming event processing.
§Streaming Semantics
- LAG(col, offset, default): Look back
offsetevents in the partition’s history buffer. Emit immediately since history is always available. - LEAD(col, offset, default): Buffer current event and wait for
offsetfuture events in the partition. Flush remaining with defaults on watermark.
§Memory Bounds
Memory is O(P * max(lag_offset, lead_offset)) where P = distinct partitions.
A max_partitions limit prevents unbounded partition growth.
Structs§
- LagLead
Config - Configuration for a LAG/LEAD operator.
- LagLead
Function Spec - Specification for a single analytic function (LAG, LEAD,
FIRST_VALUE, etc.). - LagLead
Metrics - Metrics for LAG/LEAD operator.
- LagLead
Operator - LAG/LEAD streaming operator.
Enums§
- Analytic
Function Kind - The kind of analytic window function.