THE TUMBLING WINDOW non-overlapping panes — summarize, emit, reset, repeat
Where the sliding window overlaps, the tumbling window partitions the stream into fixed, non-overlapping panes: fill a pane, emit its summary, reset, repeat. Each element belongs to exactly one window, and the state between emissions is bounded by a single pane. It is the workhorse of stream processing — “the average request latency each minute,” “the count per hour” — because it turns an unbounded stream into a bounded sequence of finished summaries. A correct batch job waits for all the data and groups it; the tumbling window emits a completed answer at every boundary, holding only the current pane. The stream becomes a stream of summaries.
THE TECHNIQUE disjoint fixed panes; emit & reset at each boundary
A stream in panes of 3. The demo emits each pane's mean and reports the last — one pane of state at a time: live demo
HISTORY & CREDIT tumbling windows · stream processing
“Per-interval aggregates need the whole stream first.” — a tumbling window emits a finished summary at every boundary, carrying only the current pane. Unbounded stream, bounded state, a sequence of done answers. cited
lineage · windowed aggregation in the early stream engines — STREAM (Stanford) and Aurora/Borealis (2002–05); the window taxonomy is set in the academic literature (Li, Maier, Tufte, Papadimos & Tucker, SIGMOD 2005) well before Flink (2014). terminology · tumbling (disjoint) vs sliding (overlapping) vs session windows — popularized by Apache Flink; the overlapping case is “hopping” in Kafka Streams / Azure but “sliding” in Flink. now · every metrics pipeline, per-minute/-hour rollups, watermarking and event-time processing.
Fill a pane, finish it, forget it, begin the next. The stream, turned into a stream of completed summaries. tumbling window
RECOMMEND FOR I-13 the last pane's mean, on the compiler
On the canonical compiler, tumbling [1,2,3,4,5,6] in panes of 3 emits means 2 then 5 — the last pane [4,5,6] averaging to 5:
$ i13 run op_tumbling.i13 # mean of the final pane [4,5,6]
RUN OK · 72 step(s) · peak stack 7 · call depth 4
last_window_mean = 5 -- one pane of state; emit and reset at each boundary
Recommend: the tumbling window is where the batch lands: it turns an endless stream into a bounded sequence of finished summaries, holding only the current pane. i13 emits the final pane mean 5. The supplement to correctness: a correct batch groups all data at the end; tumbling emits a completed answer at every boundary with one pane of memory. Not a keeper — a windowing policy, not a structural mechanism — but the right closing note for THE ONE PASS: every dart here spends the same coin, to touch each element once and carry only a bounded summary onward. The batch's verdict on that coin is on the seal.