@HiveDecimalWritableVersionV1
  @Override
  public void readFields(DataInput in) throws IOException {
    scale = WritableUtils.readVInt(in);
    int byteArrayLen = WritableUtils.readVInt(in);
    if (internalStorage.length != byteArrayLen) {
      internalStorage = new byte[byteArrayLen];
    }
    in.readFully(internalStorage);
  }
Get a OldHiveDecimal instance from the writable and constraint it with maximum precision/scale.

@param maxPrecision maximum precision
@param maxScale maximum scale
@return OldHiveDecimal instance
storage-api/src/java/org/apache/hadoop/hive/serde2/io/HiveDecimalWritableV1.java