Skip to main content

Module windowed_kgrouped

Module windowed_kgrouped 

Source
Expand description

TimeWindowedKGroupedStream<K,V>: the intermediate handle between KGroupedStream::windowed_by(TimeWindows) and a terminal windowed aggregation (count/reduce/aggregate).

This type is the windowed analogue of crate::dsl::kgrouped::KGroupedStream. It holds the same grouped lineage, which is the parent node, the key-changing flag, the optional Grouped name, and the repartition-lowering thunk. It also holds the TimeWindows spec. Its terminal ops match KGroupedStream::aggregate and reduce exactly, with two exceptions:

  1. the aggregate processor emits Windowed<K> keys, and
  2. the materialized store is a window store (crate::topology::Topology::add_window_store) that carries the window size and grace for changelog retention.

The result is a KTable<Windowed<K>, _>. Its changelog is logged with compact,delete retention derived from the window size and grace.

Structsยง

TimeWindowedKGroupedStream
Handle that KGroupedStream::windowed_by produces. Terminal windowed aggregations consume it.