mmx1960 opened a new issue, #16662: URL: https://github.com/apache/doris/issues/16662
### 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.1.3 & 1.2.1 ### What's Wrong? **case 1:** ` with vb1 as( select '7.1' as col union all select '8.123456' as col ) select 'decimal-原始未截断' as type,cast(col as decimal(25,6)) col from vb1 union all select 'decimal-截断保留3位小数' as type,truncate (cast(col as decimal(25,6)),3) col from vb1 union all select 'decimal-截断保留5位小数' as type,truncate (cast(col as decimal(25,6)),5) col from vb1 union all select 'decimal-截断保留7位小数' as type,truncate (cast(col as decimal(25,6)),7) col from vb1` the 1.1.3 and 1.2.1 result is :  **case2:** `with vb1 as( select '7.1' as col union all select '8.123456' as col ) select 'double-原始未截断' as type,cast(col as double) col from vb1 union all select 'double-截断保留3位小数' as type,truncate (cast(col as double),3) col from vb1 union all select 'double-截断保留5位小数' as type,truncate (cast(col as double),5) col from vb1 union all -- ******结果不符合预期:8.1234559***** select 'double-截断保留7位小数' as type,truncate (cast(col as double),7) col from vb1` the 1.1.3 result is:  the 1.2.1 result is:  **case3:** `with vb1 as( select cast('8.12' as decimal(20, 2)) as decimal_20_2,cast('9.123456' as decimal(20, 6)) as decimal_20_6 union all select cast('8.45' as decimal(20, 2)) as decimal_20_2,cast('9.654321' as decimal(20, 6)) as decimal_20_6 ) select '原始数据-未做类型和精度转换' as type , decimal_20_2 ,decimal_20_6 from vb1 union all select 'decimal-扩大类型' as type ,cast(decimal_20_2 as decimal(25,6)) decimal_20_2 ,cast(decimal_20_6 as decimal(25,6)) decimal_20_6 from vb1 union all select 'decimal-round四舍五入保留两位小数' as type -- *** 扩大精度后四舍五入结果错误8.12结果为8.119999999 ,round(cast(decimal_20_2 as decimal(25,6)),2) decimal_20_2 ,round(cast(decimal_20_6 as decimal(25,6)),2) decimal_20_6 from vb1` the 1.1.3 and 1.2.1 result is:  ### What You Expected? return the correct result ### How to Reproduce? _No response_ ### Anything Else? _No response_ ### 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: commits-unsubscr...@doris.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org