Commit Graph

39 Commits

Author SHA1 Message Date
Robert Schulze
bd41c74ddf
Various test, code and docs fixups 2023-01-15 13:47:34 +00:00
Robert Schulze
4ea836b87e
Revert "Revert "update function DAYOFWEEK and add new function WEEKDAY for mysql/spark compatiability""
This reverts commit e37f572c34.
2023-01-13 14:00:16 +00:00
Alexander Tokmakov
e37f572c34
Revert "update function DAYOFWEEK and add new function WEEKDAY for mysql/spark compatiability" 2023-01-12 15:01:36 +03:00
taiyang-li
a8da7b4c20 change as request 2023-01-09 20:39:46 +08:00
taiyang-li
4bc2c61406 change as request 2023-01-09 20:37:16 +08:00
taiyang-li
20c7c0b1ef change as request 2023-01-09 18:21:31 +08:00
Robert Schulze
3f03b0b53d
Revert "Revert "Add function 'age'""
This reverts commit 4549b14027.
2022-12-20 10:18:43 +00:00
Alexey Milovidov
4549b14027
Revert "Add function 'age'" 2022-12-13 23:28:09 +03:00
Roman Vasin
35a1c406ad Merge branch 'master' of github.com:ClickHouse/ClickHouse into ADQM-623 2022-11-11 07:35:44 +00:00
Roman Vasin
8f3a7b5024 Change algorithm into more accurate 2022-11-10 10:27:18 +00:00
Nikolay Degterinsky
48cc1d8492
Update DateLUTImpl.h 2022-11-08 00:15:19 +01:00
Azat Khuzhin
4e76629aaf Fixes for -Wshorten-64-to-32
- lots of static_cast
- add safe_cast
- types adjustments
  - config
  - IStorage::read/watch
  - ...
- some TODO's (to convert types in future)

P.S. That was quite a journey...

v2: fixes after rebase
v3: fix conflicts after #42308 merged
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:19 +02:00
Robert Schulze
2d448c139c
Merge pull request #42308 from arenadata/ADQM-584
Add support of Date32 arguments for date_diff function
2022-10-21 13:18:44 +02:00
Roman Vasin
d9fcd91875 Add toStableRelativeHourNum 2022-10-18 09:07:12 +00:00
Roman Vasin
4a5c3e5a6e Fix toLastDayOfMonth and other functions 2022-10-04 09:09:59 +00:00
Roman Vasin
45414b251d Merge branch 'master' of github.com:ClickHouse/ClickHouse into ADQM-583 2022-09-29 17:02:49 +00:00
Roman Vasin
cdd20241bf Finish toStartOfDay; fix toStartOfMinute 2022-09-22 13:16:46 +00:00
Alexey Milovidov
000b6ac81c Fix error 2022-09-19 09:30:48 +02:00
Alexey Milovidov
ab4db2d0c4 Fix 5/6 of trash 2022-09-19 08:50:53 +02:00
Alexey Milovidov
f4a48cd4d6 Remove cruft 2022-09-17 22:16:31 +02:00
Alexey Milovidov
fa62c7e982 Fix half of trash 2022-09-10 04:08:16 +02:00
Roman Vasin
96598e3574 Replace normalizeDayNum() by std::clamp() 2022-08-09 08:52:02 +00:00
Roman Vasin
b412ea5f6d Improve generateRandom() for Date32; fix tests 01087_table_function_generate, 01277_fromUnixTimestamp64, 01691_DateTime64_clamp and 01702_toDateTime_from_string_clamping 2022-07-25 17:06:11 +00:00
Roman Vasin
0b102c6d1f Fix code style 2022-07-22 08:24:05 +00:00
Roman Vasin
e3192cf753 Correct docs to reflect new range 1900..2299 for Date32 and DateTime64; Cleanup code 2022-07-20 15:19:02 +00:00
Roman Vasin
5f9c293963 Fix addDays() and addWeeks() in upper and lower limits of Date and Date32 2022-07-19 17:29:08 +00:00
Roman Vasin
28fd774df8 Correct 01821_to_date_time_ubsan and 01921_datatype_date32 tests 2022-07-18 16:44:14 +00:00
Roman Vasin
1d0818d9cf Set max year to 2299; Code cleanup; Make working 02245_make_datetime64 test 2022-07-15 10:33:52 +00:00
Roman Vasin
266039ea64 Correct gTests for DateLUT 2022-07-14 19:00:17 +00:00
Roman Vasin
12f4a48957 Extend LUT range to 1900..2300 2022-07-08 06:48:05 +00:00
Amos Bird
e81929a8b5
Saturate date/datetime to zero (part 2)
For partial hours/minutes timezones.
2022-04-29 10:24:18 +08:00
Memo
39aadf0975 replaced toStartOfFiveMinute to toStartOfFiveMinutes 2022-04-22 10:49:59 +08:00
Alexey Milovidov
d9e5ca2119
Merge pull request #34394 from holadepo/last_day
Add toLastDayOfMonth function
2022-04-04 07:02:08 +03:00
Robert Schulze
b56c28d841
Replace a few uses of enable_if for SFINAE by concepts
- enable_if is usually regarded as fragile and unreadable

- C++20 concepts are much easier to read and produce more expressive
  error messages
2022-03-16 19:51:38 +01:00
Maksim Kita
e7772ed434 Fix clang-tidy warnings in Common folder 2022-03-14 18:17:35 +00:00
HaiBo Li
2ea18b3085
Fix the bug that the toDatetime function overflows (#32898)
* Fixed overflow bug of the function toDatetime/toDate/toDate32/parseDateTimeBestEffort
2022-03-02 10:06:38 +03:00
Habibullah Oladepo
57ff05b6e6 Add new function toLastDayOfMonth 2022-02-08 23:48:44 +01:00
Amos Bird
0b7a94c2be Saturate date/datetime to zero 2022-01-03 02:07:08 +03:00
Alexey Milovidov
29d28c531f Move code around to avoid dlsym on Musl 2021-12-24 12:25:27 +03:00