Skip to main content

Module window

Module window 

Source
Expand description

Window Function Execution

This module implements window function execution for SQL queries.

Supports:

  • ROW_NUMBER() - Sequential row numbering
  • RANK() - Ranking with gaps
  • DENSE_RANK() - Ranking without gaps
  • NTILE(n) - Divides rows into n groups
  • LEAD(col, offset, default) - Access next row’s value
  • LAG(col, offset, default) - Access previous row’s value

Window clauses:

  • OVER () - Entire result set as one partition
  • OVER (PARTITION BY col) - Partition by column values
  • OVER (ORDER BY col) - Order within partition

Structs§

ColumnarOrderByValues
Columnar layout for ORDER BY values - optimized for sorting performance
SelectItem
Information about a SELECT list item for window function processing
WindowExecutor
Single owner for window planning, partition state, execution and result finalization. The host supplies only the immutable function registry.
WindowFunctionInfo
Information about a window function call in a SELECT list
WindowPreGroupedState
Pre-grouped state for window function PARTITION BY optimization When rows are fetched grouped by an indexed partition column, we can skip hash-based grouping
WindowPreSortedState
Pre-sorted state for window function optimization When rows are pre-sorted by an indexed column, we can skip sorting in window functions

Enums§

SelectItemSource
Source of a SELECT item value

Traits§

WindowExecutorExt
Compatibility surface used by the composition root while the surrounding SELECT orchestration is migrated.
WindowHost
Narrow composition contract required by window planning and execution.