-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
planner: support window function #8630
Conversation
@@ -0,0 +1,29 @@ | |||
// Copyright 2018 PingCAP, Inc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it belong to aggregation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the package name to udf
or something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to, window function is also a kind of aggregate function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But its behavior is quite different with normal aggregate function since it won't make the rows grouped into one though there's OVER
clause.
I think they should be in the same level not superior-subordinate.
@@ -0,0 +1,29 @@ | |||
// Copyright 2018 PingCAP, Inc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to, window function is also a kind of aggregate function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PTAL @winoros |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
/run-unit-test |
I updated the parser, PTAL @eurekaka |
What problem does this PR solve?
Support the window function in planner.
What is changed and how it works?
Add logical and physical plan operator for window function. It resolves the name in window function before projection, and build the window funtion after processing the having clause. For partition by and order by clause in window functioin, it adds sort operator as it's child.
The named window and frame clause will be processed in next PR.
Check List
Tests
Code changes
Side effects
Related changes
PTAL @zz-jason @winoros @XuHuaiyu @eurekaka
This change is