@HiveDecimalVersionV1
  public int precision() {
    int bdPrecision = bd.precision();
    int bdScale = bd.scale();

    if (bdPrecision < bdScale) {
      // This can happen for numbers less than 0.1
      // For 0.001234: bdPrecision=4, bdScale=6
      // In this case, we'll set the type to have the same precision as the scale.
      return bdScale;
    }
    return bdPrecision;
  }
Returns the number of digits (integer and fractional) in the number, which is equivalent
to SQL decimal precision. Note that this is different from BigDecimal.precision(),
which returns the precision of the unscaled value (BigDecimal.valueOf(0.01).precision() = 1,
whereas HiveDecimal.create("0.01").precision() = 2).
If you want the BigDecimal precision, use HiveDecimal.bigDecimalValue().precision()
@return
storage-api/src/java/org/apache/hadoop/hive/common/type/HiveDecimalV1.java