private void iterateSelectionHasNulls(
      Aggregation myagg,
      HiveDecimalWritable[] vector,
      int batchSize,
      boolean[] isNull,
      int[] selected) {

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