@HiveDecimalVersionV2
  public byte[] bigIntegerBytes() {
    long[] scratchLongs = new long[SCRATCH_LONGS_LEN];
    byte[] buffer = new byte[SCRATCH_BUFFER_LEN_BIG_INTEGER_BYTES];
    final int byteLength =
        fastBigIntegerBytes(
            scratchLongs, buffer);
    return Arrays.copyOfRange(buffer, 0, byteLength);
  }
Return binary representation of this decimal's BigInteger equivalent unscaled value using
the format that the BigInteger's toByteArray method returns (and the BigInteger constructor
accepts).
<p>
Used by LazyBinary, Avro, and Parquet serialization.
<p>
Scratch objects necessary to do the decimal to binary conversion without actually creating a
BigInteger object are passed for better performance.
<p>
Allocate scratchLongs with SCRATCH_LONGS_LEN longs.
And, allocate buffer with SCRATCH_BUFFER_LEN_BIG_INTEGER_BYTES bytes.
<p>
@param scratchLongs
@param buffer
@return The number of bytes used for the binary result in buffer.  Otherwise, 0 if the
        conversion failed.
storage-api/src/java/org/apache/hadoop/hive/common/type/HiveDecimal.java