public static Decimal getDecimal(ByteBuffer unscaled, short scale) {
    return new Decimal((short) scale, unscaled);
  }
This class contains helper methods for handling thrift api's Decimal
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/api/utils/DecimalUtils.java