Interface WindowFrame

All Known Implementing Classes:
WindowFrame.BoundedFrame, WindowFrame.CumulativeFrame, WindowFrame.PartitionFrame

The scope of rows fed to a WindowFunction within a partition.

A frame is the window operator's analogue of SQL's ROWS BETWEEN … AND … clause. The sealed hierarchy has three permits, each corresponding to one surface form (or the implicit full-partition frame used by ranking and offset functions):

  • WindowFrame.BoundedFrame — OVER n ROWS: the current row plus the preceding n − 1 rows (a trailing n-row sliding window).
  • WindowFrame.CumulativeFrame — OVER ALL ROWS: the full prefix of the partition up to and including the current row (running total).
  • WindowFrame.PartitionFrame — the whole partition; never written in the surface syntax, set implicitly for ranking and offset functions.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    A trailing n-row sliding window — OVER n ROWS — equivalent to SQL's ROWS BETWEEN n-1 PRECEDING AND CURRENT ROW.
    static final record 
    The cumulative (running) frame — OVER ALL ROWS — equivalent to SQL's ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW.
    static final record 
    The full-partition frame used implicitly by ranking and offset functions — equivalent to SQL's ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING.