Move decimal constants from arrow-data
to arrow-schema
crate
#3177
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rationale for this change
When building something with
arrow-schema
it's useful to have these constants without having to depend onarrow-data
.What changes are included in this PR?
This change moves the following decimal related constants from the
arrow-data
to thearrow-schema
crate:MAX_DECIMAL_FOR_EACH_PRECISION
MIN_DECIMAL_FOR_EACH_PRECISION
DECIMAL128_MAX_PRECISION
DECIMAL128_MAX_SCALE
DECIMAL256_MAX_PRECISION
DECIMAL256_MAX_SCALE
DECIMAL_DEFAULT_SCALE
Are there any user-facing changes?
Yes, this is a breaking change. It requires updating
use
statements in dependent crates. We couldpub use
these constants from thearrow-data
crate to prevent this.