Dandandan commented on a change in pull request #375:
URL: https://github.com/apache/arrow-datafusion/pull/375#discussion_r637600299



##########
File path: datafusion/src/physical_plan/windows.rs
##########
@@ -57,25 +74,81 @@ pub fn create_window_expr(
                 name,
             )?,
         })),
-        WindowFunction::BuiltInWindowFunction(fun) => {
-            Err(DataFusionError::NotImplemented(format!(
-                "window function with {:?} not implemented",
-                fun
-            )))
-        }
+        WindowFunction::BuiltInWindowFunction(fun) => 
Ok(Arc::new(BuiltInWindowExpr {
+            window: create_built_in_window_expr(fun, args, input_schema, 
name)?,
+        })),
+    }
+}
+
+fn create_built_in_window_expr(
+    fun: &BuiltInWindowFunction,
+    _args: &[Arc<dyn PhysicalExpr>],
+    _input_schema: &Schema,
+    name: String,
+) -> Result<Arc<dyn BuiltInWindowFunctionExpr>> {
+    match fun {
+        BuiltInWindowFunction::RowNumber => Ok(Arc::new(RowNumber::new(name))),
+        _ => Err(DataFusionError::NotImplemented(format!(
+            "window function with {:?} not yet implemented",

Review comment:
       ```suggestion
               "Window function with {:?} not yet implemented",
   ```




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to