@Override
    public void iterate(AggregationBuffer agg, Object[] parameters) throws HiveException {
      assert (parameters.length == 1);
      SumLongAgg myagg = (SumLongAgg) agg;
      int length = listOI.getListLength(parameters[0]);
      for (int i = 0; i < length; i++) {
        Object element = listOI.getListElement(parameters[0], i);
        if (element != null) {
          myagg.sum += (Long)toLong.convert(element);
          myagg.empty = false;
        }
      }
    }
class for storing double sum value.
itests/util/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFSumList.java