Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.0.0
-
None
-
2020-8
Description
Build tested: 1.5.4-1 (Drone build #417)
CREATE TABLE t2(c INT)ENGINE=Columnstore;
INSERT INTO t2 VALUES (1), (2);
SELECT SUM(c) FROM t2;
--------
SUM(c) |
--------
3 |
--------
1 row in set (0.075 sec)
SELECT (SELECT SUM(c) FROM t2) FROM t2;
-------------------------
(SELECT SUM(c) FROM t2) |
-------------------------
0 |
0 |
-------------------------
2 rows in set, 2 warnings (0.044 sec)
SELECT (SELECT AVG(c) FROM t2) FROM t2;
-------------------------
(SELECT AVG(c) FROM t2) |
-------------------------
0 |
0 |
-------------------------
2 rows in set, 2 warnings (0.023 sec)
SHOW WARNINGS;
--------------------------------------------------------------------
Level | Code | Message |
--------------------------------------------------------------------
Warning | 1918 | Encountered illegal value '' when converting to DECIMAL |
Warning | 1918 | Encountered illegal value '' when converting to DECIMAL |
--------------------------------------------------------------------
2 rows in set (0.000 sec)
Expected result:
SELECT (SELECT SUM(c) FROM t2) FROM t2;
-------------------------
(SELECT SUM(c) FROM t2) |
-------------------------
3 |
3 |
-------------------------
2 rows in set (0.026 sec)
SELECT (SELECT AVG(c) FROM t2) FROM t2;
-------------------------
(SELECT AVG(c) FROM t2) |
-------------------------
1.5000 |
1.5000 |
-------------------------
2 rows in set (0.026 sec)
This is a regression as it used to return the correct result in Drone build #411 and before.