Skip to content

Conversation

@jeffreyaven
Copy link
Member

Add experimental support for SQL window functions (OVER clause) and CTEs (WITH clause) to the parser via a local fork of stackql-parser.

Window function features:

  • OVER clause with optional PARTITION BY and ORDER BY
  • Frame specifications (ROWS/RANGE BETWEEN)
  • All standard frame boundary types

CTE features:

  • Simple and multiple CTEs
  • Recursive CTEs with WITH RECURSIVE
  • Optional column list specification

This is a proof-of-concept implementation for testing feasibility. The changes are in a local fork at internal/stackql-parser-fork/ with a replace directive in go.mod.

Includes:

  • Parser unit tests for both features (all passing)
  • Documentation of implementation details and next steps

Description

Type of change

  • Bug fix (non-breaking change to fix a bug).
  • Feature (non-breaking change to add functionality).
  • Breaking change.
  • Other (eg: documentation change). Please explain.

Issues referenced.

Evidence

Checklist:

  • A full round of testing has been completed, and there are no test failures as a result of these changes.
  • The changes are covered with functional and/or integration robot testing.
  • The changes work on all supported platforms.
  • Unit tests pass locally, as per the developer guide.
  • Robot tests pass locally, as per the developer guide.
  • Linter passes locally, as per the developer guide.

Variations

Tech Debt

Add experimental support for SQL window functions (OVER clause) and
CTEs (WITH clause) to the parser via a local fork of stackql-parser.

Window function features:
- OVER clause with optional PARTITION BY and ORDER BY
- Frame specifications (ROWS/RANGE BETWEEN)
- All standard frame boundary types

CTE features:
- Simple and multiple CTEs
- Recursive CTEs with WITH RECURSIVE
- Optional column list specification

This is a proof-of-concept implementation for testing feasibility.
The changes are in a local fork at internal/stackql-parser-fork/
with a replace directive in go.mod.

Includes:
- Parser unit tests for both features (all passing)
- Documentation of implementation details and next steps
@jeffreyaven jeffreyaven merged commit 5fd98aa into main Nov 30, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants