[MCOL-4610] TreeNode::getUintVal() looses precision for narrow decimal Created: 2021-03-15 Updated: 2021-03-30 Resolved: 2021-03-30 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | PrimProc |
| Affects Version/s: | 5.5.1, 5.6.1, 6.1.1 |
| Fix Version/s: | 6.1.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Sprint: | 2021-5 | ||||||||||||||||
| Description |
|
The code for the DECIMAL data type in TreeNode::getUintVal() performs calculations in double format. This approach looses precision for huge numbers.
Looks wrong. Values in the first and the second columns are expected to be equal. Note:
|
| Comments |
| Comment by Alexander Barkov [ 2021-03-17 ] | |||||||
|
The same problem is in this code: double is used to perform INT an result operation:
|