Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.0.9
-
None
Description
Hi,
the following query returns NULL when run on a table with engine Columnstore and the correct result when run on an identical table with engine Aria:
CREATE TABLE test_stats1 (
|
ts DATETIME DEFAULT NULL
|
) ENGINE = Columnstore;
|
CREATE TABLE test_stats2 (
|
ts DATETIME DEFAULT NULL
|
) ENGINE = Aria;
|
|
INSERT INTO test_stats1 VALUES ('2017-07-07 12:00:00');
|
INSERT INTO test_stats2 VALUES ('2017-07-07 12:00:00');
|
|
SELECT HOUR(TIMEDIFF(MAX(ts), now())) FROM test_stats1;
|
-> NULL
|
SELECT HOUR(TIMEDIFF(MAX(ts), now())) FROM test_stats2;
|
-> 73
|
Strangely, omitting HOUR() works correctly:
SELECT TIMEDIFF(MAX(ts), now()) FROM test_stats1;
|
-> -74:43:31
|
SELECT TIMEDIFF(MAX(ts), now()) FROM test_stats2;
|
-> -74:43:34
|
Attachments
Issue Links
- is blocked by
-
MCOL-392 TIME datatype is not supported
- Closed