csliubo opened a new issue, #19574: URL: https://github.com/apache/doris/issues/19574
### 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 2.0.0-alpha1 ### What's Wrong? The CAST(field AS DECIMAL(M,D)) function is not working as expected. It fails when M is greater than or equal to 19. The error message reads: "Error Code: 1105. errCode = 2, detailMessage = Invalid decimal type with precision = 19, scale = 0." ### What You Expected? According to the documentation (https://doris.apache.org/docs/dev/sql-manual/sql-reference/Data-Types/DECIMAL/), the range of M should be within [1, 27]. Therefore, it should work when M is less than or equal to 27. ### How to Reproduce? 1. CREATE TABLE `test` ( `id` bigint(20) NOT NULL COMMENT '雪花id' )DISTRIBUTED BY HASH(`id`) BUCKETS 16 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "storage_format" = "V2", "light_schema_change" = "true", "disable_auto_compaction" = "false" ); 2. insert into `test` values (1); 3. SELECT CAST(`id` AS DECIMAL(19,0)) FROM test; ### 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