@Override
    public AggregateCall other(RelDataTypeFactory typeFactory, AggregateCall e) {
      RelDataType countRetType = typeFactory.createTypeWithNullability(typeFactory.createSqlType(SqlTypeName.BIGINT), true);
      return AggregateCall.create(
        new HiveSqlCountAggFunction(isDistinct, ReturnTypes.explicit(countRetType), operandTypeInference, operandTypeChecker),
        false, ImmutableIntList.of(), -1, countRetType, "count");
    }
<code>Sum</code> is an aggregator which returns the sum of the values which
go into it. It has precisely one argument of numeric type (<code>int</code>,
<code>long</code>, <code>float</code>, <code>double</code>), and the result
is the same type.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/functions/HiveSqlSumAggFunction.java