Skip to content

fix: Reject ORDER BY over ungrouped columns in aggregate queries - #218

Merged
MazterQyou merged 1 commit into
cubesql-3-04-2022from
cubesql/reject-sort-not-in-group-by
Jul 14, 2026
Merged

fix: Reject ORDER BY over ungrouped columns in aggregate queries#218
MazterQyou merged 1 commit into
cubesql-3-04-2022from
cubesql/reject-sort-not-in-group-by

Conversation

@MazterQyou

Copy link
Copy Markdown
Member

This PR makes LogicalPlanBuilder::sort reject queries whose ORDER BY references a column that appears neither in GROUP BY nor in an aggregate function, matching PostgreSQL's error message. Related tests are included.

Signed-off-by: Alex Qyoun-ae <4062971+MazterQyou@users.noreply.github.com>
@MazterQyou
MazterQyou merged commit c496044 into cubesql-3-04-2022 Jul 14, 2026
21 checks passed
@MazterQyou
MazterQyou deleted the cubesql/reject-sort-not-in-group-by branch July 14, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant