-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rename expr::window_function::WindowFunction to WindowFunctionDefinition, make structure consistent with ScalarFunction
#8382
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
Conversation
alamb
left a comment
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.
Thanks @edmondop -- this is looking like a nice step in the right direction
datafusion/expr/src/expr.rs
Outdated
| /// | ||
| /// [window function]: https://en.wikipedia.org/wiki/Window_function_(SQL) | ||
| #[derive(Debug, Clone, PartialEq, Eq, Hash, EnumIter)] | ||
| pub enum BuiltInWindowFunction { |
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.
Maybe you could put BuiltInWindowFunction in datafusion/expr/src/built_in_window_function.rs to mirror BuiltInFunction?
https://github.com/apache/arrow-datafusion/blob/main/datafusion/expr/src/built_in_function.rs
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.
@alamb @haohuaijin have I understood correctly?
BuiltinWindowFunctiongoes intodatafusion/expr/src/built_in_window_function.rsWindowFunctionbecomesWindowFunctionDefinitionand goes intodatafusion/expr/src/expr.rswith its trait implementations- public functions in
window_functionstays there
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.
BuiltinWindowFunctiongoes intodatafusion/expr/src/built_in_window_function.rsWindowFunctionbecomesWindowFunctionDefinitionand goes intodatafusion/expr/src/expr.rswith its trait implementations
yes, you are correct.
- public functions in
window_functionstays there
maybe those public functions also can move to datafusion/expr/src/built_in_window_function.rs. cc @alamb
|
This PR looks like it needs some work so marking it as a draft until it is ready for review again |
expr::window_function::WindowFunction to WindowFunctionDefinition, make structure consistent with ScalarFunction
alamb
left a comment
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.
Thank you @edmondop -- I think this is great
I think it is excellent that the structure of the window functions now mirrors the structure of the scalar functions -- it will make navigating the datafusion codebase much easier
| @@ -0,0 +1,207 @@ | |||
| // Licensed to the Apache Software Foundation (ASF) under one | |||
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.
❤️
|
Thanks again @edmondop |
Which issue does this PR close?
Closes #8347
Rationale for this change
The idea is to have the ScalarFunctions and WindowFunctions consistent in structure with each other
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?