@Override
    public void reset(AggregationBuffer agg) throws HiveException {
      SumDoubleAgg myagg = (SumDoubleAgg) agg;
      myagg.sum = 0.0;
      myagg.uniqueObjects = null;
      myagg.nonNullCount = 0;
    }
class for storing double sum value.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFSum.java