alamb commented on code in PR #7179:
URL: https://github.com/apache/arrow-rs/pull/7179#discussion_r2022915974
##########
arrow-cast/src/parse.rs:
##########
@@ -986,6 +1009,13 @@ pub fn parse_decimal<T: DecimalType>(
"parse decimal overflow ({s})"
)));
}
+ if scale == 0 {
+ result = result.div_wrapping(base.pow_wrapping(fractionals as u32))
+ }
+ //add one if >=5
+ if rounding_digit >= 5 {
Review Comment:
Perhaps we could add a comment in the code to explain this point to future
readers who may have the same question
--
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]