[MCOL-4614] calShowPartitions() precision loss for huge narrow decimal Created: 2021-03-16 Updated: 2021-06-14 Resolved: 2021-06-14 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | PrimProc |
| Affects Version/s: | 5.5.1, 5.6.1 |
| Fix Version/s: | 6.1.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Sprint: | 2021-5, 2021-6, 2021-7, 2021-8 | ||||||||||||||||
| Description |
|
Notice, the Min and Max values are wrong. This happens because the underlying printing code uses double representation. It should be fixed to use native representation. |
| Comments |
| Comment by Alexander Barkov [ 2021-03-20 ] | |||||||||||||||||||||
|
gdorman No. It's a bug in the narrow decimal code. It needs to be fixed. | |||||||||||||||||||||
| Comment by Gagan Goel (Inactive) [ 2021-04-06 ] | |||||||||||||||||||||
|
For QA: Instructions to reproduce the issue and verify the fix works are in the issue description. | |||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-04-09 ] | |||||||||||||||||||||
|
Build verified: 6.1.1 ( Drone #2104 ) Reproduced the issue in 5.5.2-1 The query did not set the casual partitioning's min/max values. Could this be related to
| |||||||||||||||||||||
| Comment by Sergey Zefirov [ 2021-04-09 ] | |||||||||||||||||||||
|
Re: could it be related to It may. Let me look at it. | |||||||||||||||||||||
| Comment by Sergey Zefirov [ 2021-04-09 ] | |||||||||||||||||||||
|
I have this result:
INSERT INTO t1 VALUES (-8999999999999999.9),(-899999999999999.9); inserts two values and sets extentmap ranges. Then calShowPartitions works. What does not work is the scanning part of SELECT * FROM t1 WHERE a=0. After that query ranges stay the same - invalid range and marked as invalid. | |||||||||||||||||||||
| Comment by Sergey Zefirov [ 2021-04-09 ] | |||||||||||||||||||||
|
A script to demonstrate the problem:
| |||||||||||||||||||||
| Comment by Alexander Barkov [ 2021-06-10 ] | |||||||||||||||||||||
|
dleeyh, can you please test again? The problem with calShowPartitions() displaying N/A instead of numbers was fixed by Sergey. Thanks. | |||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-06-14 ] | |||||||||||||||||||||
|
Build verified: 6.1.1 ( Drone #2584) MariaDB [mytest]> DROP TABLE IF EXISTS t1; MariaDB [mytest]> CREATE TABLE t1 (a DECIMAL(17,1)) ENGINE=ColumnStore; MariaDB [mytest]> INSERT INTO t1 VALUES (-8999999999999999.9); MariaDB [mytest]> SELECT * FROM t1 WHERE a=0; MariaDB [mytest]> SELECT calShowPartitions('t1','a');
--------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------- |