Expand description
Window functions for time-series query processing.
Window functions compute values over a sliding window or partition of rows without collapsing the result set (unlike aggregation, which produces fewer rows). Each input row yields exactly one output value.
§Supported functions
| Function | Description |
|---|---|
RowNumber | Sequential 1-based row number within partition |
Rank | Rank with gaps (1224) for ties on the order column |
DenseRank | Rank without gaps (1223) for ties on the order column |
Lead(offset, default) | Value offset rows ahead (default if out of range) |
Lag(offset, default) | Value offset rows behind (default if out of range) |
Delta | Difference between current and previous value |
Rate | Per-second rate: delta(value) / delta(timestamp) |
IRate | Instantaneous per-second rate between last two samples |
MovingAverage(window) | Simple sliding-window mean |
CumulativeSum | Running total |
Increase | Monotonic counter increase (resets to 0 on counter wrap) |
Enums§
- Window
Fn - Window function type.
Functions§
- apply_
window - Apply window functions to a
RecordBatch. - window_
fn_ name - Human-readable function name for column naming.