Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
1.0.0
-
None
Description
Here is an example when MCS adds additional scale calculating avg on a constant INT value.
MariaDB [test]> select avg(1111233)+0.5, avg(d1) from (select d1 from cs1) t;
|
+------------------+-----------------------------+
|
| avg(1111233)+0.5 | avg(d1) |
|
+------------------+-----------------------------+
|
| 111.6233 | 2244657667789092030149.0000 |
|
+------------------+-----------------------------+
|
1 row in set (0.010 sec)
|
And here is the expected result:
MariaDB [test]> select avg(1111233)+0.5;
|
+------------------+
|
| avg(1111233)+0.5 |
|
+------------------+
|
| 1111233.5000 |
|
+------------------+
|
1 row in set (0.001 sec)
|
JFYI The code in RowAggregationUM::doNotNullConstantAggregate saves avg() as an int field setting the scale to 4 (unconditionally I presume).
Attachments
Issue Links
- is part of
-
MCOL-641 Full DECIMAL support in ColumnStore
- Closed