shiliang opened a new pull request, #69595: URL: https://github.com/apache/doris/pull/69595
## Summary - Inject `check_overflow_for_decimal` into query-side aggregate functions (`AggFnEvaluator`); storage `sum_load`/`sum_reader` keep wraparound. - DecimalV3 `SUM`/`AVG` use checked add/sub/merge (and AVG finalize scale multiply); also reject results beyond Decimal precision (e.g. `10^38-1+1` fits int128 but exceeds precision 38). - Add BE UT `AggDecimalOverflowTest` and regression `test_decimalv3_sum_avg_overflow`. ## Test plan - [x] BE UT `AggDecimalOverflowTest` (SUM/AVG overflow, merge, finalize, check-off wrap) - [x] Regression `datatype_p0/decimalv3/test_decimalv3_sum_avg_overflow` (SUM/AVG/window/distinct/nullable; decimal256 path) - [ ] CI checks on this PR -- 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]
