Skip to content

Ensure projections can have either an order by or a group by#266

Merged
git-hulk merged 1 commit intoAfterShip:masterfrom
mdevilliers:project-group-or-order
Apr 25, 2026
Merged

Ensure projections can have either an order by or a group by#266
git-hulk merged 1 commit intoAfterShip:masterfrom
mdevilliers:project-group-or-order

Conversation

@mdevilliers
Copy link
Copy Markdown
Contributor

@mdevilliers mdevilliers commented Apr 24, 2026

The existing PROJECTION parsing failed on PROJECTIONS with just a GROUP BY

This worked

ALTER TABLE t
ADD PROJECTION p (
    SELECT x ORDER BY x
)

But not

ALTER TABLE t
ADD PROJECTION p (
    SELECT x GROUP BY x
)

This PR makes both the GROUP BY and the ORDER BY optional.

It should also deal with when both are specified even if that will fail at runtime - I suppose that is the correct behaviour for a parser and formatter.

@git-hulk git-hulk changed the title fix: ensure projections can have either an order by or a group by Ensure projections can have either an order by or a group by Apr 25, 2026
@git-hulk git-hulk merged commit 1930f34 into AfterShip:master Apr 25, 2026
1 check 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.

2 participants