Skip to content

Type mismatch: Column has type DateTime('UTC'), got type DateTime #2602

@filimonov

Description

@filimonov

Test case:

create table x2 ( ts_utc DateTime DEFAULT toDateTime(ts, 'UTC'), ts DateTime )Engine = MergeTree ORDER BY ts;
INSERT INTO x2(ts) values ( now() );
alter table x2 modify column ts_utc DateTime('UTC') DEFAULT toDateTime(ts, 'UTC')
select * from x2;

Result:

Received exception from server (version 1.1.54385):
Code: 53. DB::Exception: Received from localhost:9000, ::1. DB::Exception: Type mismatch for column ts_utc. Column has type DateTime('UTC'), got type DateTime. 

Expected result: DateTime and DateTime with tz should be interchangable, as TZ defines only presentation, not a storage format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions