andygrove commented on code in PR #115:
URL: 
https://github.com/apache/arrow-datafusion-python/pull/115#discussion_r1067345116


##########
src/functions.rs:
##########
@@ -87,26 +88,27 @@ fn window(
     partition_by: Option<Vec<PyExpr>>,
     order_by: Option<Vec<PyExpr>>,
 ) -> PyResult<PyExpr> {
-    use std::str::FromStr;
-    let fun = datafusion_expr::window_function::WindowFunction::from_str(name)
-        .map_err(|e| -> errors::DataFusionError { e.into() })?;
-    Ok(PyExpr {
-        expr: datafusion_expr::Expr::WindowFunction {
-            fun,
-            args: args.into_iter().map(|x| x.expr).collect::<Vec<_>>(),
-            partition_by: partition_by
-                .unwrap_or_default()
-                .into_iter()
-                .map(|x| x.expr)
-                .collect::<Vec<_>>(),
-            order_by: order_by
-                .unwrap_or_default()
-                .into_iter()
-                .map(|x| x.expr)
-                .collect::<Vec<_>>(),
-            window_frame: None,
-        },
-    })
+    // TODO
+    todo!()
+    // let fun = find_df_window_func(name).unwrap();
+    //     //.ok_or_else(errors::DataFusionError { e.into() })?;
+    // Ok(PyExpr {
+    //     expr: datafusion_expr::Expr::WindowFunction(WindowFunction {
+    //         fun,
+    //         args: args.into_iter().map(|x| x.expr).collect::<Vec<_>>(),
+    //         partition_by: partition_by
+    //             .unwrap_or_default()
+    //             .into_iter()
+    //             .map(|x| x.expr)
+    //             .collect::<Vec<_>>(),
+    //         order_by: order_by
+    //             .unwrap_or_default()
+    //             .into_iter()
+    //             .map(|x| x.expr)
+    //             .collect::<Vec<_>>(),
+    //         window_frame: None,

Review Comment:
   We now need to provide a WindowFrame here, and I am not familiar enough with 
window support to know what to do here without some research. I wonder if 
anyone can help me with this? @francis-du @Jimexist ?



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

Reply via email to