@Override
        protected Object[] getCurrentIntermediateResult(
            org.apache.hadoop.hive.ql.udf.generic.GenericUDAFStreamingEvaluator.SumAvgEnhancer<DoubleWritable, Object[]>.SumAvgStreamingState ss)
            throws HiveException {
          SumDoubleAgg myagg = (SumDoubleAgg) ss.wrappedBuf;
          return myagg.nonNullCount == 0 ? null : new Object[] { myagg.sum, myagg.nonNullCount};
        }
class for storing double sum value.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFSum.java