@Override public boolean isAggregator() { return operator.isAggregator(); }
/** * Creates a RexOver. * * <p>For example, "SUM(DISTINCT x) OVER (ROWS 3 PRECEDING)" is represented * as: * * <ul> * <li>type = Integer, * <li>op = {@link org.apache.calcite.sql.fun.SqlStdOperatorTable#SUM}, * <li>operands = { {@link RexFieldAccess}("x") } * <li>window = {@link SqlWindow}(ROWS 3 PRECEDING) * </ul> * * @param type Result type * @param op Aggregate operator * @param operands Operands list * @param window Window specification * @param distinct Aggregate operator is applied on distinct elements */ RexOver( RelDataType type, SqlAggFunction op, List<RexNode> operands, RexWindow window, boolean distinct) { super(type, op, operands); Preconditions.checkArgument(op.isAggregator()); this.window = Objects.requireNonNull(window); this.distinct = distinct; }
/** * Creates a RexOver. * * <p>For example, "SUM(DISTINCT x) OVER (ROWS 3 PRECEDING)" is represented * as: * * <ul> * <li>type = Integer, * <li>op = {@link org.apache.calcite.sql.fun.SqlStdOperatorTable#SUM}, * <li>operands = { {@link RexFieldAccess}("x") } * <li>window = {@link SqlWindow}(ROWS 3 PRECEDING) * </ul> * * @param type Result type * @param op Aggregate operator * @param operands Operands list * @param window Window specification * @param distinct Aggregate operator is applied on distinct elements */ RexOver( RelDataType type, SqlAggFunction op, List<RexNode> operands, RexWindow window, boolean distinct) { super(type, op, operands); Preconditions.checkArgument(op.isAggregator()); this.window = Objects.requireNonNull(window); this.distinct = distinct; }