Skip to main content

Module lag_lead

Module lag_lead 

Source
Expand description

§LAG/LEAD Operator

Per-row analytic window functions for streaming event processing.

§Streaming Semantics

  • LAG(col, offset, default): Look back offset events in the partition’s history buffer. Emit immediately since history is always available.
  • LEAD(col, offset, default): Buffer current event and wait for offset future 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§

LagLeadConfig
Configuration for a LAG/LEAD operator.
LagLeadFunctionSpec
Specification for a single analytic function (LAG, LEAD, FIRST_VALUE, etc.).
LagLeadMetrics
Metrics for LAG/LEAD operator.
LagLeadOperator
LAG/LEAD streaming operator.

Enums§

AnalyticFunctionKind
The kind of analytic window function.