@HiveDecimalVersionV2
  public int toBytes(
      byte[] scratchBuffer) {
    return
        fastToBytes(
            scratchBuffer);
  }
Decimal to ASCII bytes conversion.
<p>
The scratch buffer will contain the result afterwards.  It should be
SCRATCH_BUFFER_LEN_TO_BYTES bytes long.
<p>
The result is produced at the end of the scratch buffer, so the return value is the byte
index of the first byte.  The byte slice is [byteIndex:SCRATCH_BUFFER_LEN_TO_BYTES-1].
storage-api/src/java/org/apache/hadoop/hive/common/type/HiveDecimal.java