[MCOL-564] Aggregation overflow error Created: 2017-02-10 Updated: 2019-06-24 Resolved: 2019-05-29 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | ExeMgr |
| Affects Version/s: | 1.0.7, 1.1.5 |
| Fix Version/s: | 1.2.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Daniel Lee (Inactive) | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 2 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Epic Link: | ColumnStore Compatibility Improvements | ||||||||||||||||
| Description |
|
Build 1.0.7-1 This is a known issue. MariaDB [mytest]> create table t1 (c1 bigint) engine=columnstore; MariaDB [mytest]> insert into t1 values (9223372036854775807), (9223372036854775807); MariaDB [mytest]> select sum(c1) from t1; in err.log Feb 10 15:45:18 ip-172-30-0-236 joblist[18843]: 18.318893 |26|0|0| C 05 CAL0000: Aggregation overflow.: 9223283296451814817+152123350462331 > 9223372036854775807 I discuss with the InfiniDB engineers on this issue before. I believe the issue is that the datatype of the variable used to hold intermediate and final aggregation result is 64 bit. Summing two hugh 64 bit values would trigger this error. I believe this issue is system wide, rather than one specific area so we need to look at it from a system design point of view. |
| Comments |
| Comment by Andrew Hutchings (Inactive) [ 2017-02-10 ] |
|
For MariaDB's SUM() function the result type is DECIMAL which can hold a 65 digit integer. We need to be able to support DECIMAL properly to get around that limit. |
| Comment by David Thompson (Inactive) [ 2018-08-07 ] |
|
Note that in less extreme cases setting infinidb_double_for_decimal_math = on can also be a solution as you increase the possible range of intermediate accumulated values by using double however double precision can come into play. |
| Comment by Andrew Hutchings (Inactive) [ 2019-05-29 ] |
|
Duplicate of |