@Override
  protected void func(BytesColumnVector outV, DecimalColumnVector inV, int i) {
    HiveDecimalWritable decWritable = inV.vector[i];
    final int byteIndex = decWritable.toFormatBytes(inV.scale, scratchBuffer);
    assign(outV, i, scratchBuffer, byteIndex, HiveDecimal.SCRATCH_BUFFER_LEN_TO_BYTES - byteIndex);
  }
To support vectorized cast of decimal to string.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CastDecimalToString.java