You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/30 16:37:20 UTC

[GitHub] [arrow-rs] viirya commented on a diff in pull request #2245: Fix max and min value for decimal precision greater than 38

viirya commented on code in PR #2245:
URL: https://github.com/apache/arrow-rs/pull/2245#discussion_r933855924


##########
arrow/src/datatypes/datatype.rs:
##########
@@ -309,7 +309,6 @@ pub const MAX_DECIMAL_FOR_EACH_PRECISION: [i128; 38] = [
 /// `MAX_DECIMAL_FOR_LARGER_PRECISION[p]` holds the maximum integer value
 /// that can be stored in [DataType::Decimal256] value of precision `p` > 38
 pub const MAX_DECIMAL_FOR_LARGER_PRECISION: [&str; 38] = [
-    "99999999999999999999999999999999999999",

Review Comment:
   This is only 38 digits, it should be 39.



##########
arrow/src/datatypes/datatype.rs:
##########
@@ -395,7 +395,6 @@ pub const MIN_DECIMAL_FOR_EACH_PRECISION: [i128; 38] = [
 /// `MIN_DECIMAL_FOR_LARGER_PRECISION[p]` holds the minimum integer value
 /// that can be stored in a [DataType::Decimal256] value of precision `p` > 38
 pub const MIN_DECIMAL_FOR_LARGER_PRECISION: [&str; 38] = [
-    "-99999999999999999999999999999999999999",

Review Comment:
   ditto.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org