- All Known Implementing Classes:
WindowFunction.AggregateWindow,WindowFunction.OffsetWindow,WindowFunction.RankingWindow
public sealed interface WindowFunction
permits WindowFunction.AggregateWindow, WindowFunction.RankingWindow, WindowFunction.OffsetWindow
The computation a
WindowNode performs per row. A single
sealed hierarchy covers all three window families; the permit encodes what
differs while WindowNode holds what they share (partition keys, sort
specs, frame, output column).
WindowFunction.AggregateWindow— sliding / cumulative aggregates (SUM,AVG,COUNT,MIN,MAX); introduced by theROLLINGkeyword (slice 2).WindowFunction.RankingWindow— ranking functions (ROW_NUMBER,RANK, …);WINDOWkeyword (slice 3).WindowFunction.OffsetWindow— offset functions (LAG,LEAD,FIRST_VALUE,LAST_VALUE);WINDOWkeyword (slice 4).
All three forms are permitted by the one sealed interface, so every switch over a window function is exhaustive and a consumer cannot silently ignore a form it does not handle.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA sliding / cumulative aggregate over anOperandargument — the sameAggregateOperator+Operandpair used byγ.static final recordAn offset function (slice 4).static final recordA ranking function (slice 3).