-
Notifications
You must be signed in to change notification settings - Fork 8.3k
DateTime64 cmp DateTime constant / column inconsistency. #19078
Copy link
Copy link
Closed
Labels
comp-datetimeDate/DateTime/TimeZone datatypes and date-time semantics.Date/DateTime/TimeZone datatypes and date-time semantics.unexpected behaviourResult is unexpected, but not entirely wrong at the same time.Result is unexpected, but not entirely wrong at the same time.
Description
CREATE TABLE dt64test
(`dt64column` DateTime64(3))
ENGINE = MergeTree
PARTITION BY toYYYYMM(dt64column)
ORDER BY dt64column;
INSERT INTO dt64test VALUES ('2020-01-13 13:37:00');
SELECT 1 FROM dt64test WHERE dt64column = toDateTime('2020-01-13 13:37:00');
DB::Exception: Key expression contains comparison between inconvertible types: DateTime64(3) and DateTime
SELECT 1 FROM dt64test WHERE dt64column = materialize(toDateTime('2020-01-13 13:37:00'));
┌─1─┐
│ 1 │
└───┘Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
comp-datetimeDate/DateTime/TimeZone datatypes and date-time semantics.Date/DateTime/TimeZone datatypes and date-time semantics.unexpected behaviourResult is unexpected, but not entirely wrong at the same time.Result is unexpected, but not entirely wrong at the same time.