liaoxin01 opened a new issue, #9208: URL: https://github.com/apache/incubator-doris/issues/9208
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues. ### Description At present, the decimal type has some problems. 1. The unified use of decimal128 in the vectorization execution layer brings performance and memory overhead. For low precision, decimal32 or decimal64 can be used. 2. Insufficient precision support for decimal. For decimal(p, s), 1 < p < 27 and 0 < s < 9. In some scenarios, we need higher precision and scale. ### Solution There are several stages to optimize the performance and precision of decimal. **Step1:** Fe passed precision and scale of decimal to be, so the vectorization execution layer can use this information. **Step2:** The vectorization execution layer uses decimal32, decimal64 or decimal128 to calculate according to the precision and scale information from fe. **Step3:** Add a new decimal type to the storage layer. Decimal of low precision uses decimal 32 (int32_t) or decimal 64 (int64_t) for storage. Decimal of high precision uses decimal128 (_int128) for storage. It can support the maximum precision of 38. Scale only needs to be less than precision. ### Are you willing to submit PR? - [X] 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