Interface RelBuilder.OverCall

Enclosing class:

public static interface RelBuilder.OverCall
Call to a windowed aggregate function.

To create an OverCall, start with an RelBuilder.AggCall (created by a method such as RelBuilder.aggregateCall(org.apache.calcite.sql.SqlAggFunction, boolean, org.apache.calcite.rex.RexNode, java.lang.String, org.apache.calcite.rex.RexNode...), RelBuilder.sum(org.apache.calcite.rex.RexNode) or RelBuilder.count(org.apache.calcite.rex.RexNode...)) and call its RelBuilder.AggCall.over() method. For example,


Unlike an aggregate call, a windowed aggregate call is an expression that you can use in a Project or Filter. So, to finish, call toRex() to convert the OverCall to a RexNode; the as(java.lang.String) method (used in the above example) does the same but also assigns an column alias.