void validateAggregateFunctions(final LogicalAggregate aggregate) {
    if (aggregate.getAggCallList().size() != 1) {
      String errMsg = "Windowing is supported ONLY with one aggregate function but the number of given functions are " +
          aggregate.getAggCallList().size();
      log.error(errMsg);
      throw new SamzaException(errMsg);
    }

    if (aggregate.getAggCallList().get(0).getAggregation().getKind() != SqlKind.COUNT) {
      String errMsg = "Windowing is supported ONLY with COUNT aggregate function";
      log.error(errMsg);
      throw new SamzaException(errMsg);
    }
  }
Translator to translate the LogicalAggregate node in the relational graph to the corresponding StreamGraph
implementation
samza-sql/src/main/java/org/apache/samza/sql/translator/LogicalAggregateTranslator.java