Files
doris/be
TengJianPing 58765f9cde [fix](decimal) Fix incorrect decimal cast results for scientific-notation strings (#63119)
Related PR: Bug introduced by #60004

Fix incorrect string-to-decimal parsing for scientific notation.
 
Previously, decimal parsing could count exponent characters as part of
the significand, causing
values like `"1.4E+2"` to be cast incorrectly as `14` instead of `140`.
It could also round very
small scientific-notation values incorrectly when the significant digit
appeared after implicit
fractional zeros, such as `"5e-17"` for scale 15.
 
This change makes the parser track the end of the significand separately
from the exponent,
applies exponent-based decimal-point shifting correctly, and only rounds
when the next real
significand digit is the first discarded fractional digit.

Also add comments to help understand the code.
2026-05-12 20:26:44 +08:00
..
…