private void iterateSelectionNoNulls(
      Aggregation myagg,
      HiveDecimalWritable[] vector,
      int batchSize,
      int[] selected) {

    if (myagg.isNull) {
      myagg.sum.setFromLong(0L);
      myagg.isNull = false;
    }

    for (int i=0; i< batchSize; ++i) {
      myagg.sum.mutateAdd(vector[selected[i]]);
    }
  }
class for storing the current aggregate value.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/VectorUDAFSumDecimal.java