Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
builtins: use intermediate decimal context for distributed aggregation
Aggregate builtin functions round the final result using the default decimal precision. In some cases, one aggregate uses the result of another in its own calculations. This could previously cause slightly different results between local and distributed execution for aggregates that return decimal values. This patch adds `intermediateResult` methods to the aggregates that are used in the intermediate calculations for other aggregates. This avoids the rounding of intermediate results, which ensures accurate results for distributed execution. Fixes #94827 Release note (bug fix): Fixed a rounding error that could cause distributed execution for some decimal aggregate functions to return slightly inaccurate results in rare cases.
- Loading branch information
1 parent
845b23a
commit 75084b0
Showing
3 changed files
with
82 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters