@Override
    public BigDecimal asBigDecimal(int scale) {
        BigDecimal v = getValue();
        if (v != null && v.scale() != scale) {
            v = v.setScale(scale, ClickHouseDataConfig.DEFAULT_ROUNDING_MODE);
        }

        return v;
    }
Update value of the given object or create a new instance if {@code ref} is
null.

@param ref   object to update, could be null
@param value value
@return same object as {@code ref} or a new instance if it's null
clickhouse-data/src/main/java/com/clickhouse/data/value/ClickHouseBigDecimalValue.java