gruuya commented on code in PR #8700:
URL: https://github.com/apache/arrow-rs/pull/8700#discussion_r2460113096
##########
arrow-cast/src/parse.rs:
##########
@@ -963,6 +963,14 @@ pub fn parse_decimal<T: DecimalType>(
}
if !is_e_notation {
+ if scale == 0 && fractionals > 0 {
+ // The input string contained some fractional digits after the
decimal point despite
+ // the scale being zero. Eject all the fractional digits from the
number.
+ result = result.div_wrapping(base.pow_wrapping(fractionals as _));
Review Comment:
I think it would, added another test case on that note
(`("123.000000000000000000004", 123)`).
--
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]