Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix max and min decimal for max precision #1917

Merged
merged 1 commit into from Jun 21, 2022

Conversation

viirya
Copy link
Member

@viirya viirya commented Jun 20, 2022

Which issue does this PR close?

Closes #1916.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jun 20, 2022
@@ -238,7 +238,7 @@ pub const MAX_DECIMAL_FOR_EACH_PRECISION: [i128; 38] = [
99999999999999999999999999999999999,
999999999999999999999999999999999999,
9999999999999999999999999999999999999,
170141183460469231731687303715884105727,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is max value of i128, not max value of decimal of precision 38.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@viirya
This is a mistake when i create this table and use the max or min of i128.

@codecov-commenter
Copy link

Codecov Report

Merging #1917 (b9e4b19) into master (ded6316) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1917   +/-   ##
=======================================
  Coverage   83.41%   83.42%           
=======================================
  Files         214      214           
  Lines       56991    57004   +13     
=======================================
+ Hits        47541    47553   +12     
- Misses       9450     9451    +1     
Impacted Files Coverage Δ
arrow/src/datatypes/datatype.rs 65.79% <ø> (+0.37%) ⬆️
arrow/src/array/array_dictionary.rs 91.53% <0.00%> (-0.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ded6316...b9e4b19. Read the comment docs.

Copy link
Contributor

@liukun4515 liukun4515 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your fix.
LGTM

@viirya viirya merged commit 12ac5c7 into apache:master Jun 21, 2022
@viirya
Copy link
Member Author

viirya commented Jun 21, 2022

Thank you @liukun4515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect max and min decimals
3 participants