Skip to content

Fields of type DateTime64 cannot be used in WHERE section #9008

@msamusenka

Description

@msamusenka

Describe the bug or unexpected behaviour

Fields of type DateTime64 cannot be used in WHERE section.

How to reproduce

Version: 20.1.3

CREATE TABLE t2
(
    `c1` DateTime64(3)
)
ENGINE = Memory;
INSERT INTO t2 VALUES ('2020-02-05 14:34:12.333'), ('2020-02-05 15:18:32.444') ;
SELECT * FROM t2 WHERE c1 = '2020-02-05 14:34:12.333';

Expected behavior
Query conditions are expected to work in the same manner as for DateTime data type.

Error message and/or stacktrace

Received exception from server (version 20.1.3):
Code: 43. DB::Exception: Received from 127.0.0.1:9600. DB::Exception: Illegal types of arguments (DateTime64(3), String) of function equals.

Metadata

Metadata

Assignees

Labels

comp-datetimeDate/DateTime/TimeZone datatypes and date-time semantics.questionQuestion?

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions