Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
1.0.11, 1.1.0
-
None
-
2017-20, 2017-21
Description
to reproduce:
CREATE TABLE test(
|
id BIGINT(20) NULL DEFAULT NULL,
|
integerfield INT(10) UNSIGNED NULL DEFAULT NULL,
|
integerfield2 INT(10) UNSIGNED NULL DEFAULT NULL )
|
ENGINE=Columnstore;
|
|
INSERT INTO test
|
VALUES (1, NULL,1), (2, NULL,1), (1,NULL,1);
|
|
SELECT COUNT(distinct id),
|
SUM(integerfield),
|
SUM(integerfield2),
|
coalesce(SUM(integerfield),0),
|
coalesce(SUM(integerfield2),0),
|
coalesce(SUM(integerfield),0) + coalesce(SUM(integerfield2),0)
|
FROM test;
|
The last column value is -9223372036854775805 instead of 3. Removing the count(distinct) results in the correct result.