[MCOL-3518] float and double display ignores number of decimals Created: 2019-09-27 Updated: 2019-11-18 Resolved: 2019-11-18 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | MDB Plugin |
| Affects Version/s: | 1.4 |
| Fix Version/s: | 1.4.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | David Hall (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Sprint: | 2019-06 |
| Description |
|
In 1.4, we lost modify access to Field_num::dec. We had been setting this to handle the proper display of values converted to double internally. Now we display things that should have fixed number of decimals with variable number of decimal. A fix would be to do our own conversion to string type and return that for display. |
| Comments |
| Comment by David Hall (Inactive) [ 2019-10-31 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
QA: Example:
---------------------
--------------------- Note that the number of decimals for AVG and REGR_AVGX are 6, which is the two from l_extendedprice + 4. Before this patch AVG and REGR_AVGX would be different, with AVG being correct, but REGR_AVGX with possibly many more decimal places. This did not affect 1.2, but is a regression due to convergence. Similarly for REGR_AVGY:
---------------------
--------------------- This takes the AVG of the Y (first) parameter. SInce l_tax has 2 decimal places defined, the result should have 6 decimal places. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2019-11-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: 1.4.1-1 [dlee@master tests]$ cat /data/qa/release/1.4.1-1/centos7/gitversionInfo.txt When trying to run queries, I hit the following error: select avg(l_extendedprice), l_tax, regr_avgx(l_tax, l_extendedprice) from lineitem group by l_tax order by l_tax; I think this is the same issue as reported in other bugs. I will test again when the issue is fixed. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2019-11-18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verfied: 1.4.1-1 github source Server Engine MariaDB [tpch1]> select avg(l_extendedprice), l_tax, regr_avgx(l_tax, l_extendedprice) from lineitem group by l_tax order by l_tax;
---------------------
--------------------- MariaDB [tpch1]> select avg(l_extendedprice), l_tax, regr_avgy(l_tax, l_extendedprice) from lineitem group by l_tax order by l_tax;
---------------------
--------------------- |