stuartcarnie commented on code in PR #6703:
URL: https://github.com/apache/arrow-datafusion/pull/6703#discussion_r1238004128
##########
datafusion-examples/examples/simple_udwf.rs:
##########
Review Comment:
The documentation in this example is excellent 👏🏻
##########
datafusion-examples/README.md:
##########
@@ -57,6 +57,7 @@ cargo run --example csv_sql
- [`rewrite_expr.rs`](examples/rewrite_expr.rs): Define and invoke a custom
Query Optimizer pass
- [`simple_udaf.rs`](examples/simple_udaf.rs): Define and invoke a User
Defined Aggregate Function (UDAF)
- [`simple_udf.rs`](examples/simple_udf.rs): Define and invoke a User Defined
(scalar) Function (UDF)
+- [`simple_udfw.rs`](examples/simple_udwf.rs): Define and invoke a User
Defined Window Function (UDWF)
Review Comment:
These examples are 💯
##########
datafusion/core/src/dataframe.rs:
##########
@@ -218,6 +218,14 @@ impl DataFrame {
Ok(DataFrame::new(self.session_state, plan))
}
+ /// Apply one or more window functions ([`Expr::WindowFunction`]) to
extend the schema
+ pub fn window(self, window_exprs: Vec<Expr>) -> Result<DataFrame> {
Review Comment:
I was just looking for a similar API today – great to know it is coming
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]