@Override
  public void assignRowColumn(VectorizedRowBatch batch, int batchIndex, int columnNum,
      AggregationBuffer agg) throws HiveException {

    DecimalColumnVector outputColVector = (DecimalColumnVector) batch.cols[columnNum];

    Aggregation myagg = (Aggregation) agg;
    final boolean isNull;
    if (!myagg.isNull) {
      myagg.sum.mutateEnforcePrecisionScale(
          outputDecimalTypeInfo.getPrecision(), outputDecimalTypeInfo.getScale());
      isNull = !myagg.sum.isSet();
    } else {
      isNull = true;
    }
    if (isNull) {
      outputColVector.noNulls = false;
      outputColVector.isNull[batchIndex] = true;
      return;
    }
    outputColVector.isNull[batchIndex] = false;

    outputColVector.set(batchIndex, myagg.sum);
  }
class for storing the current aggregate value.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/VectorUDAFSumDecimal.java