Skip to content

-1 was handled differently in 21.3 and 21.6+ for DateTime32 column #29835

@zhicwu

Description

@zhicwu

In 21.6, 21.8 and latest version, -1 is interpreted as 1970-01-01 00:00:00; while in 21.3 it's 2106-02-07 06:28:15.

To reproduce the issue:

create table test_datetime32(no UInt8, datetime32 DateTime32, ndatetime32 Nullable(DateTime32)) engine=Memory
insert into table test_datetime32 values(2, -1, -1)
select * except(no) from test_datetime32 order by no

┌──────────datetime32─┬─────────ndatetime32─┐
│ 2106-02-07 06:28:152106-02-07 06:28:15 │
└─────────────────────┴─────────────────────┘

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions