[MCOL-4650] TreeNode::getIntVal() looses precision for narrow decimal Created: 2021-03-30 Updated: 2021-03-30 Resolved: 2021-03-30 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | PrimProc |
| Affects Version/s: | 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: |
|
||||||||||||||||||||||||
| Description |
|
The code in TreeNode::getIntVal() performs DECIMAL-to-INT conversion using pow(), so the calculation is done in double format. This leads to precision loss and therefore to MariaDB incompatible results.
The above result is wrong. The expected result is:
|