private static void checkScaleRange(short scale) {
    if (scale < MIN_SCALE) {
      throw new ArithmeticException(
          "Decimal128 does not support negative scaling");
    }
    if (scale > MAX_SCALE) {
      throw new ArithmeticException("Beyond possible Decimal128 scaling");
    }
  }
Throws an exception if the given scale is invalid for this object.

@param scale
         scale value
common/src/java/org/apache/hadoop/hive/common/type/Decimal128.java