Adapted from arrow-rs validate_decimal_precision but returns bool
instead of Err to avoid the cost of formatting the error strings and is
optimized to remove a memcpy that exists in the original function
we can remove this code once we upgrade to a version of arrow-rs that
includes https://github.com/apache/arrow-rs/pull/6419