cj-zhukov commented on code in PR #20366:
URL: https://github.com/apache/datafusion/pull/20366#discussion_r2893912709
##########
docs/source/library-user-guide/upgrading/53.0.0.md:
##########
@@ -398,3 +398,124 @@ Now:
+-------+
0 row(s) fetched.
```
+
+### Ordered-set aggregate DataFrame API simplified
+
+The DataFrame APIs for the following ordered-set aggregate functions have
changed:
+
+- `percentile_cont`
+- `approx_percentile_cont`
+- `approx_percentile_cont_with_weight`
+
+Previously, these functions required a `Sort` expression as input.
+They now accept the value expression `expr` directly along with an `asc: bool`
+parameter to specify sort direction.
+
+This change simplifies the API and removes the need to manually construct
+a `Sort` expression.
+
+**Who is affected:**
+
+- Users constructing ordered-set aggregate expressions using the DataFrame API.
+
+SQL syntax is unaffected.
+
+**Migration guide:**
+
+- Replace calls that construct a `Sort` expression (for example
+ `col("foo").sort(true, false)`) with the value expression directly and
+ provide the `asc` boolean parameter instead.
+
+#### percentile_cont
+
+**Before:**
+
+```rust,ignore
+pub fn percentile_cont(order_by: Sort, percentile: Expr) -> Expr
+
+let expr = percentile_cont(col("foo").sort(true, false), lit(0.5));
+```
+
+**After:**
+
+```rust,ignore
+pub fn percentile_cont(expr: Expr, percentile: Expr, asc: bool) -> Expr
+
+let expr = percentile_cont(col("foo"), lit(0.5), true);
+```
+
+#### approx_percentile_cont
+
+**Before:**
+
+```rust,ignore
+pub fn approx_percentile_cont(
Review Comment:
Thanks for the suggestion - that makes sense.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]