This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 95771daa22 Minor: Add upgrade guide for `Expr::WindowFunction` (#16313)
95771daa22 is described below
commit 95771daa22508974d3709adfa0b57db3e074ce7d
Author: Andrew Lamb <[email protected]>
AuthorDate: Sun Jun 8 06:57:18 2025 -0400
Minor: Add upgrade guide for `Expr::WindowFunction` (#16313)
---
docs/source/library-user-guide/upgrading.md | 54 +++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/docs/source/library-user-guide/upgrading.md
b/docs/source/library-user-guide/upgrading.md
index 3922e0d45d..9576a1963b 100644
--- a/docs/source/library-user-guide/upgrading.md
+++ b/docs/source/library-user-guide/upgrading.md
@@ -21,6 +21,60 @@
## DataFusion `48.0.0`
+### `Expr::WindowFunction` is now `Box`ed
+
+`Expr::WindowFunction` is now a `Box<WindowFunction>` instead of a
`WindowFunction` directly.
+This change was made to reduce the size of `Expr` and improve performance when
+planning queries (see [details on #16207]).
+
+This is a breaking change, so you will need to update your code if you match
+on `Expr::WindowFunction` directly. For example, if you have code like this:
+
+```rust
+# /* comment to avoid running
+match expr {
+ Expr::WindowFunction(WindowFunction {
+ params:
+ WindowFunctionParams {
+ partition_by,
+ order_by,
+ ..
+ }
+ }) => {
+ // Use partition_by and order_by as needed
+ }
+ _ => {
+ // other expr
+ }
+}
+# */
+```
+
+You will need to change it to:
+
+```rust
+# /* comment to avoid running
+match expr {
+ Expr::WindowFunction(window_fun) => {
+ let WindowFunction {
+ fun,
+ params: WindowFunctionParams {
+ args,
+ partition_by,
+ ..
+ },
+ } = window_fun.as_ref();
+ // Use partition_by and order_by as needed
+ }
+ _ => {
+ // other expr
+ }
+}
+# */
+```
+
+[details on #16207]:
https://github.com/apache/datafusion/pull/16207#issuecomment-2922659103
+
### The `VARCHAR` SQL type is now represented as `Utf8View` in Arrow.
The mapping of the SQL `VARCHAR` type has been changed from `Utf8` to
`Utf8View`
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]