@Override
    public AggregationBuffer getNewAggregationBuffer() throws HiveException {
      SumHiveDecimalWritableAgg agg = new SumHiveDecimalWritableAgg();
      reset(agg);
      return agg;
    }
class for storing decimal sum value.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFSum.java