public static long getDecimal64AbsMaxFromDecimalTypeString(String typeString) {
    TypeInfo typeInfo = TypeInfoUtils.getTypeInfoFromTypeString(typeString);
    if (!(typeInfo instanceof DecimalTypeInfo)) {
      throw new RuntimeException(
          "Expected decimal type but found " + typeInfo.toString());
    }
    DecimalTypeInfo decimalTypeInfo = (DecimalTypeInfo) typeInfo;
    final int precision = decimalTypeInfo.precision();
    if (!HiveDecimalWritable.isPrecisionDecimal64(precision)) {
      throw new RuntimeException(
          "Expected decimal type " + typeInfo.toString() +
          " to have a decimal64 precision (i.e. <= " + HiveDecimalWritable.DECIMAL64_DECIMAL_DIGITS + ")");
    }
    return HiveDecimalWritable.getDecimal64AbsMax(precision);
  }
Utility functions for vector operations on decimal64 values.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/Decimal64Util.java