@Override
    void copy(VectorizedRowBatch inBatch, int inBatchIndex, VectorizedRowBatch outBatch, int outBatchIndex) {
      ColumnVector inColVector = inBatch.cols[inColumnIndex];
      ColumnVector outColVector = outBatch.cols[outColumnIndex];
      if (inColVector instanceof DecimalColumnVector) {
        if (outColVector instanceof DecimalColumnVector) {
          copyDecimalToDecimal((DecimalColumnVector) inColVector, inBatchIndex,
              (DecimalColumnVector) outColVector, outBatchIndex);
        } else {
          copyDecimalToDecimal64((DecimalColumnVector) inColVector, inBatchIndex,
              (Decimal64ColumnVector) outColVector, outBatchIndex);
        }
      } else {
        if (outColVector instanceof DecimalColumnVector) {
          copyDecimal64ToDecimal((Decimal64ColumnVector) inColVector, inBatchIndex,
              (DecimalColumnVector) outColVector, outBatchIndex);
        } else {
          copyDecimal64ToDecimal64((Decimal64ColumnVector) inColVector, inBatchIndex,
              (Decimal64ColumnVector) 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