Jimexist commented on a change in pull request #571:
URL: https://github.com/apache/arrow-datafusion/pull/571#discussion_r657096028



##########
File path: datafusion/src/logical_plan/expr.rs
##########
@@ -1452,11 +1452,18 @@ impl fmt::Debug for Expr {
             }
             Expr::WindowFunction {
                 fun,
-                ref args,
+                args,
+                partition_by,

Review comment:
       that's a separate construct not yet available in the sql parser.
   
   see https://www.postgresql.org/docs/current/tutorial-window.html
   
   > When a query involves multiple window functions, it is possible to write 
out each one with a separate OVER clause, but this is duplicative and 
error-prone if the same windowing behavior is wanted for several functions. 
Instead, each windowing behavior can be named in a WINDOW clause and then 
referenced in OVER. For example:
   
   ```sql
   SELECT sum(salary) OVER w, avg(salary) OVER w
     FROM empsalary
     WINDOW w AS (PARTITION BY depname ORDER BY salary DESC);
   ```




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