-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Remove BuiltInWindowFunction (LogicalPlans)
#13393
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
|
There are actually several related "BuiltInWindowExpr" in physical-expr that need to be cleaned up as well (that are no longer related to BuiltInWindowExprs). We may also be able to remove a level of trait. |
e6bb4c5 to
a300ee5
Compare
BuiltInWindowFunctionBuiltInWindowFunction (LogicalPlans)
|
@alamb @buraksenn @Omega359 Pretty sure we can now clean up the old window docs, due to the nth_value migration being merged. Lemme see if I can do that really quick |
Yes, we can -- I think that is tracked by |
datafusion/expr/src/expr.rs
Outdated
| /// | ||
| /// In SQL, you can use: | ||
| /// - Actual window functions ([`WindowUDF`]) | ||
| /// - Noraml aggregate functions ([`AggregateUDF`]) |
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.
typo here: "Normal"
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.
Fixed in 6b1a243
|
LGTM 👍. Thanks @alamb |
crepererum
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.
❤️
|
|
||
| /// Logical representation of a user-defined window function (UDWF) | ||
| /// A UDWF is different from a UDF in that it is stateful across batches. | ||
| /// Logical representation of a user-defined window function (UDWF). |
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.
I also threw in some drive by documentation improvements to sweeten the deal 🍯
| aggregate, | ||
| ) | ||
| } | ||
| // TODO: Ordering not supported for Window UDFs yet |
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.
ORDER BY is already supported as the order_by clause is passed to window_expr_from_aggregate_expr
datafusion/expr/src/expr.rs
Outdated
| /// | ||
| /// In SQL, you can use: | ||
| /// - Actual window functions ([`WindowUDF`]) | ||
| /// - Noraml aggregate functions ([`AggregateUDF`]) |
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.
Fixed in 6b1a243
|
Thanks @crepererum and @jcsherin for the reviews |
* Remove BuiltInWindowFunction * fix docs * Fix typo (cherry picked from commit 75a27a8)
* Remove BuiltInWindowFunction * fix docs * Fix typo (cherry picked from commit 75a27a8)
Which issue does this PR close?
WindowFunctionInterface (remove built in list ofBuiltInWindowFunctions) #8709 🎉!!!nth_valuebuiltIn function to User Defined Window Function #13201Rationale for this change
@buraksen and @jcsherin ported the last window function over, so now we can remove the old BuiltInWindowFunction code
This was so tempting a cleanup that I had to give it a try (and I wanted to do some coding)
What changes are included in this PR?
Changes:
BuiltInWindowFunctionBuiltInWindowFunctionDefinition::BuiltInWindowFunctionAre these changes tested?
Yes, by existing CI