Skip to content

Extend SQL grammar to allow for empty OVER() - #8

Merged
sgress454 merged 2 commits into
sgress454:masterfrom
juan-fdz-hawa:33759-ui-valid-query-with-window-function-is-incorrectly-flagged-with-a-syntax-error
May 14, 2026
Merged

Extend SQL grammar to allow for empty OVER()#8
sgress454 merged 2 commits into
sgress454:masterfrom
juan-fdz-hawa:33759-ui-valid-query-with-window-function-is-incorrectly-flagged-with-a-syntax-error

Conversation

@juan-fdz-hawa

Copy link
Copy Markdown

Fixes #33759

Make PARTITION BY optional by extracting it into a partition_by_clause sub-rule referenced as ? from over_partition, so all four shapes parse: empty OVER(), order-only, partition-only, and the original partition+order form.
Screenshot 2026-05-06 at 10 52 00 AM

Fixes #33759

Make PARTITION BY optional by extracting it into a `partition_by_clause`
sub-rule referenced as `?` from `over_partition`, so all four shapes
parse: empty `OVER()`, order-only, partition-only, and the original
partition+order form.

@sgress454 sgress454 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, mind adding regression tests for the cases this fixes?

@sgress454
sgress454 merged commit ce819ad into sgress454:master May 14, 2026
juan-fdz-hawa pushed a commit to fleetdm/fleet that referenced this pull request May 14, 2026
Resolves #33759 

Bumps Fleet's `@sgress454/node-sql-parser` to the version that includes
sgress454/node-sql-parser#8, with fixes for
#33759.
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