fix: serialize user-defined window functions to proto#13421
Merged
alamb merged 11 commits intoapache:mainfrom Nov 15, 2024
Merged
fix: serialize user-defined window functions to proto#13421alamb merged 11 commits intoapache:mainfrom
alamb merged 11 commits intoapache:mainfrom
Conversation
jcsherin
commented
Nov 14, 2024
Comment on lines
+2123
to
+2129
| fn try_decode_udwf(&self, name: &str, _buf: &[u8]) -> Result<Arc<WindowUDF>> { | ||
| not_impl_err!("PhysicalExtensionCodec is not provided for window function {name}") | ||
| } | ||
|
|
||
| fn try_encode_udwf(&self, _node: &WindowUDF, _buf: &mut Vec<u8>) -> Result<()> { | ||
| Ok(()) | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Tested by roundtrip_physical_plan::roundtrip_udwf_extension_codec.
jcsherin
commented
Nov 14, 2024
| WindowFrameBound::CurrentRow, | ||
| ); | ||
|
|
||
| let nth_value_window = |
Contributor
Author
There was a problem hiding this comment.
This is the test referred in #13201 (comment)
|
Thanks! I can confirm this fixes our tests. |
alamb
approved these changes
Nov 14, 2024
| window_frame, | ||
| codec, | ||
| )? | ||
| } else if let Some(built_in_window_expr) = expr.downcast_ref::<BuiltInWindowExpr>() { |
Contributor
There was a problem hiding this comment.
The naming of these structures is wild (the physical exprs aren't actually BuiltInWindowExprs) but that is an issue to fix for another day
Contributor
Author
|
I just merged up from main to fix conflict. |
Contributor
|
Thanks again @jcsherin |
mwylde
pushed a commit
to ArroyoSystems/arrow-datafusion
that referenced
this pull request
Nov 22, 2024
* Adds roundtrip physical plan test * Adds enum for udwf to `WindowFunction` * initial fix for serializing udwf * Revives deleted test * Adds codec methods for physical plan * Rewrite error message * Minor: rename binding + formatting fixes * Extends `PhysicalExtensionCodec` for udwf * Minor: formatting * Restricts visibility to tests
avantgardnerio
pushed a commit
to coralogix/arrow-datafusion
that referenced
this pull request
Sep 23, 2025
* Adds roundtrip physical plan test * Adds enum for udwf to `WindowFunction` * initial fix for serializing udwf * Revives deleted test * Adds codec methods for physical plan * Rewrite error message * Minor: rename binding + formatting fixes * Extends `PhysicalExtensionCodec` for udwf * Minor: formatting * Restricts visibility to tests (cherry picked from commit d840e98)
avantgardnerio
pushed a commit
to coralogix/arrow-datafusion
that referenced
this pull request
Sep 23, 2025
* Adds roundtrip physical plan test * Adds enum for udwf to `WindowFunction` * initial fix for serializing udwf * Revives deleted test * Adds codec methods for physical plan * Rewrite error message * Minor: rename binding + formatting fixes * Extends `PhysicalExtensionCodec` for udwf * Minor: formatting * Restricts visibility to tests (cherry picked from commit d840e98)
avantgardnerio
pushed a commit
to coralogix/arrow-datafusion
that referenced
this pull request
Oct 2, 2025
…328) v44 * Adds roundtrip physical plan test * Adds enum for udwf to `WindowFunction` * initial fix for serializing udwf * Revives deleted test * Adds codec methods for physical plan * Rewrite error message * Minor: rename binding + formatting fixes * Extends `PhysicalExtensionCodec` for udwf * Minor: formatting * Restricts visibility to tests (cherry picked from commit d840e98)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #13401.
Rationale for this change
Same as #13401.
What changes are included in this PR?
PhysicalExtensionCodec:Are these changes tested?
Yes, roundtrip physical plan for,
PhysicalExtensionCodec.Are there any user-facing changes?
No.