@HiveDecimalWritableVersionV2
  public boolean serializationUtilsWrite(
      OutputStream outputStream,
      long[] scratchLongs)
          throws IOException {
    if (!isSet()) {
      throw new RuntimeException("no value set");
    }
    return
        fastSerializationUtilsWrite(
            outputStream,
            scratchLongs);
  }
See the comments for HiveDecimal.serializationUtilsWrite.
storage-api/src/java/org/apache/hadoop/hive/serde2/io/HiveDecimalWritable.java