zhengruifeng commented on code in PR #39149:
URL: https://github.com/apache/spark/pull/39149#discussion_r1055006030


##########
connector/connect/common/src/main/protobuf/spark/connect/expressions.proto:
##########
@@ -39,6 +39,63 @@ message Expression {
     UnresolvedRegex unresolved_regex = 8;
     SortOrder sort_order = 9;
     LambdaFunction lambda_function = 10;
+    Window window = 11;
+  }
+
+
+  // Expression for the OVER clause or WINDOW clause.
+  message Window {
+
+    // (Required) The window function.
+    Expression window_function = 1;
+
+    // (Optional) The way that input rows are partitioned.
+    repeated Expression partition_spec = 2;
+
+    // (Optional) Ordering of rows in a partition.
+    repeated SortOrder order_spec = 3;
+
+    // (Optional) Window frame in a partition.
+    //
+    // If not set, it will be treated as 'UnspecifiedFrame'.
+    WindowFrame frame_spec = 4;

Review Comment:
   it seems we don't add `optional` for other proto messages:
   
   for example
   ```
   message Project {
     // (Optional) Input relation is optional for Project.
     //
     // For example, `SELECT ABS(-1)` is valid plan without an input plan.
     Relation input = 1;
   
     // (Required) A Project requires at least one expression.
     repeated Expression expressions = 3;
   }
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to