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 aggregation -> window function; change formatter #634

Merged
merged 4 commits into from
Oct 25, 2023

Conversation

AveryQi115
Copy link
Contributor

DO NOT PUSH PROJECT SOLUTIONS PUBLICLY.

And especially do NOT open pull requests with project solutions!

Please be considerate of this free educational resource.

@AveryQi115 AveryQi115 requested review from skyzh and ChaosZhai October 25, 2023 14:46
Signed-off-by: Nicola115 <[email protected]>
Signed-off-by: Nicola115 <[email protected]>
Copy link
Member

@skyzh skyzh left a comment

Choose a reason for hiding this comment

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

LGTM except that I believe the executor should still be named as WindowAggregationExecutor?

@@ -564,7 +564,7 @@ auto Binder::BindFuncCall(duckdb_libpgquery::PGFuncCall *root) -> std::unique_pt
}

if (function_name == "min" || function_name == "max" || function_name == "first" || function_name == "last" ||
function_name == "sum" || function_name == "count") {
function_name == "sum" || function_name == "count" || function_name == "rank") {
Copy link
Member

Choose a reason for hiding this comment

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

I think we still need to have ROW_NUMBER here, but rewriting it to count(1) somewhere in planner?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed it to WindowFunctionExecutor because I think rank and row_number are not aggregations and in postgres docs, it is also named as window function.

About Row_number, I'll add the row_number function and change it to count(1) in planner.

Signed-off-by: Nicola115 <[email protected]>
@AveryQi115 AveryQi115 merged commit 94a3105 into master Oct 25, 2023
3 checks passed
@AveryQi115 AveryQi115 deleted the window_function2 branch October 25, 2023 19:48
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