Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window functions should use all breakouts except first for partitioning #42131

Merged

Conversation

camsaul
Copy link
Member

@camsaul camsaul commented May 1, 2024

When I implemented #2862 in #41340 earlier in the 50 cycle I had it partition by all breakouts except the first, and order by the last breakout; this behavior was confusing and product asked me to change it to order by the first breakout and partition by all the other ones. See this Slack thread https://metaboat.slack.com/archives/C05MPF0TM3L/p1714084449574689

Since this hasn't gone out yet it doesn't hurt to change the behavior of this stuff now.

Fixes #42003

@camsaul camsaul added the no-backport Do not backport this PR to any branch label May 1, 2024
@camsaul camsaul requested a review from a team May 1, 2024 23:10
@metabase-bot metabase-bot bot added the .Team/QueryProcessor :hammer_and_wrench: label May 1, 2024
Copy link

replay-io bot commented May 1, 2024

Status Complete ↗︎
Commit 7ddff98
Results
⚠️ 12 Flaky
2443 Passed

Copy link
Contributor

@metamben metamben left a comment

Choose a reason for hiding this comment

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

LGTM

src/metabase/driver/sql/query_processor.clj Outdated Show resolved Hide resolved
@camsaul camsaul enabled auto-merge (squash) May 3, 2024 00:25
@camsaul camsaul merged commit 69fc2b2 into master May 3, 2024
110 checks passed
@camsaul camsaul deleted the change-breakouts-to-use-for-window-function-partitions branch May 3, 2024 00:50
Copy link

github-actions bot commented May 3, 2024

@camsaul Did you forget to add a milestone to the issue for this PR? When and where should I add a milestone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-backport Do not backport this PR to any branch .Team/QueryProcessor :hammer_and_wrench:
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cumulative count/sum grouping should ORDER BY first and PARTITION BY all other breakouts
2 participants