private void copyDecimal64ToDecimal(Decimal64ColumnVector inColVector, int inBatchIndex,
        DecimalColumnVector outColVector, int outBatchIndex) {
      if (inColVector.isRepeating) {
        if (inColVector.noNulls || !inColVector.isNull[0]) {
          outColVector.isNull[outBatchIndex] = false;
          HiveDecimalWritable scratchWritable = inColVector.getScratchWritable();
          scratchWritable.setFromLongAndScale(inColVector.vector[0], inColVector.scale);
          outColVector.set(outBatchIndex, scratchWritable);
        } else {
          VectorizedBatchUtil.setNullColIsNullValue(outColVector, outBatchIndex);
        }
      } else {
        if (inColVector.noNulls || !inColVector.isNull[inBatchIndex]) {
          outColVector.isNull[outBatchIndex] = false;
          HiveDecimalWritable scratchWritable = inColVector.getScratchWritable();
          scratchWritable.setFromLongAndScale(inColVector.vector[inBatchIndex], inColVector.scale);
          outColVector.set(outBatchIndex, scratchWritable);
        } else {
          VectorizedBatchUtil.setNullColIsNullValue(outColVector, outBatchIndex);
        }
      }
    }
This class copies specified columns of a row from one VectorizedRowBatch to another.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorCopyRow.java