buraksenn commented on code in PR #13201:
URL: https://github.com/apache/datafusion/pull/13201#discussion_r1835785085


##########
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:
   I could not make this expression work with the first_value_udwf? I looked to 
the similar things but still could not build the required expression. Can I get 
some help please @jcsherin @berkaysynnada ?



-- 
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

Reply via email to