@HiveDecimalVersionV1
  public int precision() {
    return fastSqlPrecision();
  }
Returns the number of digits (integer and fractional) in the number, which is equivalent
to SQL decimal precision.
<p>
Note that this method is different from rawPrecision(), which returns the number of digits
ignoring the scale.  Note that rawPrecision returns 0 when the value is 0.

    Decimal            precision              rawPrecision
       0                    1                         0
       1                    1                         1
      -7                    1                         1
      0.1                   1                         1
      0.04                  2                         1
      0.00380               5                         3
    104.0009                7                         7
<p>
If you just want the actual number of digits, use rawPrecision().
storage-api/src/java/org/apache/hadoop/hive/common/type/HiveDecimal.java