Dandandan commented on a change in pull request #334:
URL: https://github.com/apache/arrow-datafusion/pull/334#discussion_r635518750
##########
File path: ballista/rust/core/proto/ballista.proto
##########
@@ -151,6 +153,25 @@ message AggregateExprNode {
LogicalExprNode expr = 2;
}
+enum BuiltInWindowFunction {
+ ROW_NUMBER = 0;
+ RANK = 1;
+ DENSE_RANK = 2;
+ LAG = 3;
+ LEAD = 4;
+ FIRST_VALUE = 5;
+ LAST_VALUE = 6;
+}
+
+message WindowExprNode {
+ oneof window_function {
+ AggregateFunction aggr_function = 1;
Review comment:
I checked whether this makes sense to reuse aggregate functions for
window expressions - I think it does! E.g. PostgreSQL also says:
https://www.postgresql.org/docs/9.3/functions-window.html
> In addition to these functions, any built-in or user-defined aggregate
function can be used as a window function (see Section 9.20 for a list of the
built-in aggregates). Aggregate functions act as window functions only when an
OVER clause follows the call; otherwise they act as regular aggregates.
--
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]