-
Notifications
You must be signed in to change notification settings - Fork 8.3k
toStartOf... functions do not work with datetime64 extended range #25284
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
How to reproduce
- ClickHouse server: 21.4.7.3
- Queries
WITH toDateTime64('1940-01-01 01:00:00', 0) AS dt64 SELECT dt64,toStartOfDay(dt64) - Results
┌────────────────dt64─┬──toStartOfDay(dt64)─┐ │ 1940-01-01 01:00:00 │ 2076-02-06 06:28:16 │ └─────────────────────┴─────────────────────┘
Expected behavior
return date 1940-01-01 00:00:00 instead of 2076-02-06 06:28:16
Additional context
most date functions return unexpected value
this seems to overflowed by date before 1970
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.