Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
5.6.1, 6.1.1
-
None
Description
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a DECIMAL(18,17)) ENGINE=ColumnStore; |
INSERT INTO t1 VALUES (-8.99999999999999999); |
SELECT AVG(a) FROM t1; |
+--------------------------+
|
| AVG(a) |
|
+--------------------------+
|
| -8.999999999999999989600 |
|
+--------------------------+
|
Looks wrong. The expected result is:
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a DECIMAL(18,17)) ENGINE=InnoDB; |
INSERT INTO t1 VALUES (-8.99999999999999999); |
SELECT AVG(a) FROM t1; |
+--------------------------+
|
| AVG(a) |
|
+--------------------------+
|
| -8.999999999999999990000 |
|
+--------------------------+
|
Attachments
Issue Links
- is duplicated by
-
MCOL-4603 Replace long double with wide/narrow-decimal for avg() and sum() result type for all numerical datatypesdecimal result
- Closed