Skip to main content

Module running

Module running 

Source
Expand description

Peer-aware running-aggregate for RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW.

This is the specialised fast path for the most common ordered-window pattern (the PostgreSQL default frame for windows with ORDER BY).

Peer semantics: two rows with equal ORDER BY values are in the same peer group. All peers in a group see the same aggregate result: the value computed at the last peer in the group (i.e., they all include each other). This matches PostgreSQL behaviour for RANGE CURRENT ROW.