protected final void processAggregate() {
        // add identity projections
        addProjectedFields();

        for (AggregateCall aggCall : aggregate.getAggCallList()) {
          processAggCall(aggCall);
        }
      }
The new projections expressions inserted belove the aggregate

These projections could be used to prepocess the incoming datastream.
For example a CAST might need to be injected.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveRewriteToDataSketchesRules.java