presto-hive/src/main/java/io/prestosql/plugin/hive/util/DecimalUtils.java/DecimalUtils/getLongDecimalValue
class DecimalUtils:    public static Slice getLongDecimalValue(HiveDecimalWritable writable, int columnScale)
    {
        BigInteger value = new BigInteger(writable.getInternalStorage());
        value = rescale(value, writable.getScale(), columnScale);
        return encodeUnscaledValue(value);
    }