zhengruifeng commented on code in PR #39149:
URL: https://github.com/apache/spark/pull/39149#discussion_r1055007935
##########
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;
+
+ // The window frame
+ message WindowFrame {
+
+ // (Required) The type of the frame.
+ FrameType frame_type = 1;
+
+ // (Required) The lower bound of the frame.
+ FrameBoundary lower = 2;
+
+ // (Required) The upper bound of the frame.
+ FrameBoundary upper = 3;
+
+ enum FrameType {
+ // RowFrame treats rows in a partition individually.
+ ROW_FRAME = 0;
+
+ // RangeFrame treats rows in a partition as groups of peers.
+ // All rows having the same 'ORDER BY' ordering are considered as
peers.
+ RANGE_FRAME = 1;
+ }
Review Comment:
will update, thanks
--
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]