-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove BuiltInWindowFunction
(LogicalPlans)
#13393
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
BuiltInWindowFunction
BuiltInWindowFunction
(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 |
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.
❤️
@@ -39,8 +39,16 @@ use datafusion_functions_window_common::field::WindowUDFFieldArgs; | |||
use datafusion_functions_window_common::partition::PartitionEvaluatorArgs; | |||
use datafusion_physical_expr_common::physical_expr::PhysicalExpr; | |||
|
|||
/// 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 🍯
@@ -120,7 +117,6 @@ pub fn create_window_expr( | |||
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 |
Which issue does this PR close?
WindowFunction
Interface (remove built in list ofBuiltInWindowFunction
s) #8709 🎉!!!nth_value
builtIn 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:
BuiltInWindowFunction
BuiltInWindowFunctionDefinition::BuiltInWindowFunction
Are these changes tested?
Yes, by existing CI