buraksenn commented on code in PR #13201: URL: https://github.com/apache/datafusion/pull/13201#discussion_r1836137334
########## datafusion/proto/tests/cases/roundtrip_physical_plan.rs: ########## @@ -272,31 +269,34 @@ fn roundtrip_window() -> Result<()> { let field_b = Field::new("b", DataType::Int64, false); let schema = Arc::new(Schema::new(vec![field_a, field_b])); - let window_frame = WindowFrame::new_bounds( + let _window_frame = WindowFrame::new_bounds( datafusion_expr::WindowFrameUnits::Range, WindowFrameBound::Preceding(ScalarValue::Int64(None)), WindowFrameBound::CurrentRow, ); - let builtin_window_expr = Arc::new(BuiltInWindowExpr::new( - Arc::new(NthValue::first( - "FIRST_VALUE(a) PARTITION BY [b] ORDER BY [a ASC NULLS LAST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW", - col("a", &schema)?, - DataType::Int64, - false, - )), - &[col("b", &schema)?], - &LexOrdering{ - inner: vec![PhysicalSortExpr { - expr: col("a", &schema)?, - options: SortOptions { - descending: false, - nulls_first: false, - }, - }] - }, - Arc::new(window_frame), - )); + // let udwf_window_expr = Expr::WindowFunction(WindowFunction::new( + // WindowFunctionDefinition::WindowUDF(first_value_udwf()), + + // let builtin_window_expr = Arc::new(BuiltInWindowExpr::new( + // Arc::new(NthValue::first( + // "FIRST_VALUE(a) PARTITION BY [b] ORDER BY [a ASC NULLS LAST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW", + // col("a", &schema)?, + // DataType::Int64, + // false, + // )), + // &[col("b", &schema)?], + // &LexOrdering{ + // inner: vec![PhysicalSortExpr { Review Comment: That one fails with: ``` to proto: NotImplemented("WindowExpr not supported: BuiltInWindowExpr { expr: WindowUDFExpr { fun: WindowUDF { inner: NthValue { signature: Signature { type_signature: OneOf([Any(0), Any(1), Any(2)]), volatility: Immutable }, kind: First } }, args: [Column { name: \"a\", index: 0 }], name: \"FIRST_VALUE(a) PARTITION BY [b] ORDER BY [a ASC NULLS LAST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW\", input_types: [Int64], is_reversed: false, ignore_nulls: false }, partition_by: [Column { name: \"b\", index: 1 }], order_by: LexOrdering { inner: [PhysicalSortExpr { expr: Column { name: \"a\", index: 0 }, options: SortOptions { descending: false, nulls_first: false } }] }, window_frame: WindowFrame { units: Range, start_bound: Preceding(Int64(NULL)), end_bound: CurrentRow, is_causal: false } }") ``` Checking if I can fix it -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org