presto-orc/src/main/java/io/prestosql/orc/metadata/statistics/StatisticsHasher.java/StatisticsHasher/putOptionalBigDecimal
class StatisticsHasher:    public StatisticsHasher putOptionalBigDecimal(BigDecimal value)
    {
        hasher.putBoolean(value != null);
        if (value != null) {
            // this should really be 128 bits
            hasher.putInt(value.scale());
            hasher.putBytes(value.unscaledValue().toByteArray());
        }
        return this;
    }