Open
Description
Summary:
Extend the semantic analyzer to support named windows. The analyzer must ensure that any named window referenced in the query is defined in the appropriate scope and raise clear errors when it isn’t.
SELECT col1, RANK() OVER w FROM t WINDOW w AS (PARTITION BY col2 ORDER BY col3);
Explanation:
- The analyzer needs to maintain a symbol table of named windows defined in the query.
- It must verify that each reference to a named window (like w) corresponds to a previously defined window specification.
- Make sure the planner uses this information if it encounters named windows.
- If a query references an undefined named window, the analyzer should provide a clear error message.