buraksenn commented on code in PR #13201:
URL: https://github.com/apache/datafusion/pull/13201#discussion_r1836542435
##########
datafusion/proto/src/physical_plan/to_proto.rs:
##########
@@ -101,39 +101,10 @@ pub fn serialize_physical_window_expr(
codec: &dyn PhysicalExtensionCodec,
) -> Result<protobuf::PhysicalWindowExprNode> {
let expr = window_expr.as_any();
- let mut args = window_expr.expressions().to_vec();
+ let args = window_expr.expressions().to_vec();
let window_frame = window_expr.get_window_frame();
- let (window_function, fun_definition) = if let Some(built_in_window_expr) =
- expr.downcast_ref::<BuiltInWindowExpr>()
- {
- let expr = built_in_window_expr.get_built_in_func_expr();
- let built_in_fn_expr = expr.as_any();
-
- let builtin_fn =
- if let Some(nth_value_expr) =
built_in_fn_expr.downcast_ref::<NthValue>() {
- match nth_value_expr.get_kind() {
- NthValueKind::First =>
protobuf::BuiltInWindowFunction::FirstValue,
- NthValueKind::Last =>
protobuf::BuiltInWindowFunction::LastValue,
- NthValueKind::Nth(n) => {
- args.insert(
- 1,
- Arc::new(Literal::new(
- datafusion_common::ScalarValue::Int64(Some(n)),
- )),
- );
- protobuf::BuiltInWindowFunction::NthValue
- }
- }
- } else {
- return not_impl_err!("BuiltIn function not supported:
{expr:?}");
- };
-
- (
-
physical_window_expr_node::WindowFunction::BuiltInFunction(builtin_fn as i32),
- None,
- )
- } else if let Some(plain_aggr_window_expr) =
Review Comment:
this part is causing the issue since we can't convert UDWF to anything now
--
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]