private final void appendAggCall(AggregateCall aggCall) {
        RexNode projRex = rexBuilder.makeInputRef(aggCall.getType(), newProjectsAbove.size());

        newAggCalls.add(aggCall);
        newProjectsAbove.add(projRex);
      }
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