-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: serialize user-defined window functions to proto #13421
Conversation
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(()) | ||
} |
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.
Tested by roundtrip_physical_plan::roundtrip_udwf_extension_codec
.
WindowFrameBound::CurrentRow, | ||
); | ||
|
||
let nth_value_window = |
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.
This is the test referred in #13201 (comment)
Thanks! I can confirm this fixes our tests. |
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.
@@ -120,6 +120,25 @@ pub fn serialize_physical_window_expr( | |||
window_frame, | |||
codec, | |||
)? | |||
} else if let Some(built_in_window_expr) = expr.downcast_ref::<BuiltInWindowExpr>() { |
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.
The naming of these structures is wild (the physical exprs aren't actually BuiltInWindowExprs) but that is an issue to fix for another day
I just merged up from main to fix conflict. |
Thanks again @jcsherin |
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.