tustvold commented on code in PR #3177:
URL: https://github.com/apache/arrow-rs/pull/3177#discussion_r1031522227
##########
arrow-data/src/decimal.rs:
##########
@@ -638,108 +641,6 @@ pub(crate) const
MIN_DECIMAL_BYTES_FOR_LARGER_EACH_PRECISION: [i256; 76] = [
]),
];
-/// `MAX_DECIMAL_FOR_EACH_PRECISION[p]` holds the maximum `i128` value
-/// that can be stored in [arrow_schema::DataType::Decimal128] value of
precision `p`
-pub const MAX_DECIMAL_FOR_EACH_PRECISION: [i128; 38] = [
- 9,
- 99,
- 999,
- 9999,
- 99999,
- 999999,
- 9999999,
- 99999999,
- 999999999,
- 9999999999,
- 99999999999,
- 999999999999,
- 9999999999999,
- 99999999999999,
- 999999999999999,
- 9999999999999999,
- 99999999999999999,
- 999999999999999999,
- 9999999999999999999,
- 99999999999999999999,
- 999999999999999999999,
- 9999999999999999999999,
- 99999999999999999999999,
- 999999999999999999999999,
- 9999999999999999999999999,
- 99999999999999999999999999,
- 999999999999999999999999999,
- 9999999999999999999999999999,
- 99999999999999999999999999999,
- 999999999999999999999999999999,
- 9999999999999999999999999999999,
- 99999999999999999999999999999999,
- 999999999999999999999999999999999,
- 9999999999999999999999999999999999,
- 99999999999999999999999999999999999,
- 999999999999999999999999999999999999,
- 9999999999999999999999999999999999999,
- 99999999999999999999999999999999999999,
-];
-
-/// `MIN_DECIMAL_FOR_EACH_PRECISION[p]` holds the minimum `i128` value
-/// that can be stored in a [arrow_schema::DataType::Decimal128] value of
precision `p`
-pub const MIN_DECIMAL_FOR_EACH_PRECISION: [i128; 38] = [
- -9,
- -99,
- -999,
- -9999,
- -99999,
- -999999,
- -9999999,
- -99999999,
- -999999999,
- -9999999999,
- -99999999999,
- -999999999999,
- -9999999999999,
- -99999999999999,
- -999999999999999,
- -9999999999999999,
- -99999999999999999,
- -999999999999999999,
- -9999999999999999999,
- -99999999999999999999,
- -999999999999999999999,
- -9999999999999999999999,
- -99999999999999999999999,
- -999999999999999999999999,
- -9999999999999999999999999,
- -99999999999999999999999999,
- -999999999999999999999999999,
- -9999999999999999999999999999,
- -99999999999999999999999999999,
- -999999999999999999999999999999,
- -9999999999999999999999999999999,
- -99999999999999999999999999999999,
- -999999999999999999999999999999999,
- -9999999999999999999999999999999999,
- -99999999999999999999999999999999999,
- -999999999999999999999999999999999999,
- -9999999999999999999999999999999999999,
- -99999999999999999999999999999999999999,
-];
-
-/// The maximum precision for [arrow_schema::DataType::Decimal128] values
-pub const DECIMAL128_MAX_PRECISION: u8 = 38;
Review Comment:
Could we add `pub use` to avoid this being a breaking change?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]