-
Notifications
You must be signed in to change notification settings - Fork 0
RFC 019: Window functions #36
Copy link
Copy link
Open
Labels
RFCRFC design and planningRFC design and planningdocumentationImprovements or additions to documentationImprovements or additions to documentationpackageLibrary source, tests, incan.tomlLibrary source, tests, incan.tomlspecificationdocs/rfcs/ normative RFCsdocs/rfcs/ normative RFCs
Description
Metadata
Metadata
Assignees
Labels
RFCRFC design and planningRFC design and planningdocumentationImprovements or additions to documentationImprovements or additions to documentationpackageLibrary source, tests, incan.tomlLibrary source, tests, incan.tomlspecificationdocs/rfcs/ normative RFCsdocs/rfcs/ normative RFCs
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Todo
Use this issue to track InQL RFC 019, which already exists at
docs/rfcs/019_window_functions.md.Area
Summary
RFC 019 defines InQL window functions and window specifications: partitioning, ordering, frames, ranking functions, offset functions, and value functions.
Motivation
Window functions are not ordinary aggregates. They produce one value per input row while seeing a related set of rows, so InQL needs a distinct placement, typing, and lowering contract.
Proposal sketch
The RFC defines window function classes and window specification rules for query-block and dataframe-style authoring. It separates analytic windows from aggregate semantics and from future streaming event-time windows.
Open design questions to resolve before Planned:
WHEREor only in projection/order positions?IGNORE NULLS/RESPECT NULLSstyle modifiers?Alternatives considered
The RFC rejects treating windows as aggregates, delaying window functions until streaming windows exist, and exposing only backend SQL strings for windows.
Impact / compatibility
This RFC affects window helper APIs, query syntax checking, placement diagnostics, Prism/Substrait lowering for partition/order/frame semantics, and documentation that separates aggregate and window functions.
Implementation notes (optional)
Handle after the registry and relevant aggregate/scalar foundations are settled so window function entries share the same function identity and metadata model.
Checklist