liuboF2c opened a new issue, #17191: URL: https://github.com/apache/doris/issues/17191
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues. ### Version 1.2.2 ### What's Wrong? Data precision is lost when using the CAST function to convert DOUBLE type to DECIMAL type. 133059.33 will be converted to 133059.32999999.    ### What You Expected? When using the CAST function to convert 133059.33 of the DOUBLE type to the DECIMAL type, it is still 133059.33 ### How to Reproduce? _No response_ ### Anything Else? SQL: SELECT CAST(ROUND(CAST(t_a_0.`C_8e43b548775420c62858337ce2152b8e` AS DECIMAL(10,8)), 8) AS DECIMAL(10,8)) castRoundCast, ROUND(CAST(t_a_0.`C_8e43b548775420c62858337ce2152b8e` AS DECIMAL(10,8)), 8) roundCast, CAST(t_a_0.`C_8e43b548775420c62858337ce2152b8e` AS DECIMAL(10,8)) castDecimal, CAST(t_a_0.`C_8e43b548775420c62858337ce2152b8e` AS double) castDouble FROM `ds_f55411c9_0615_47dc_b9bb_1f2f055049b3` t_a_0 WHERE t_a_0.`C_8e43b548775420c62858337ce2152b8e` = '133059.33'; ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
