Commit Graph

39 Commits

Author SHA1 Message Date
avogar
fc23f1c1ff Fix tests 2024-08-14 12:20:33 +00:00
Robert Schulze
2909e6451b
Move StringUtils.h/cpp back to Common/ 2024-05-19 09:39:36 +00:00
Alexey Milovidov
224e1940ae Useless changes 2024-05-09 03:58:34 +02:00
Nikolay Degterinsky
f162ea8341 Fix use-of-uninitialized-value in parseDateTimeBestEffort 2024-03-21 09:51:10 +00:00
Alexey Milovidov
d15f7b2158 Fix questionable behavior in the parseDateTimeBestEffort function 2024-03-03 01:42:59 +01:00
avogar
7e392eec50 Better exception messages in input formats 2023-11-21 13:13:42 +00:00
Robert Schulze
f5137dd0b4
More clang-tidy fixes 2023-09-21 14:40:57 +00:00
Victor Krasnov
3f77b778e3 Fix runtime bug 2023-06-06 11:42:45 +03:00
Victor Krasnov
6d25e5a0d7 Substitute missing year in parseDateTimeBestEffortImpl() 2023-06-06 07:37:14 +03:00
xiedeyantu
02b3ae0081 Dec 15, 2021 support for parseDateTimeBestEffort function 2023-03-01 21:05:58 +08:00
Alexey Milovidov
d8cda3dbb8 Remove PVS-Studio 2023-02-19 23:30:05 +01:00
Alexander Tokmakov
3744fa2c63 format more messages 2023-01-25 21:16:42 +01:00
Alexander Tokmakov
d1baa7300c reformat ParsingException 2023-01-24 23:21:29 +01:00
avogar
28c090f7a5 Fix decimal math overflow in parsing datetime with 'best effort' algorithm 2022-11-11 15:42:53 +00:00
flynn
e30297e599 fix and update test 2022-10-04 13:36:28 +00:00
flynn
86cb9f7034 parseDataTimeBestEffort support comma between date and time 2022-10-04 09:52:20 +00:00
Alexey Milovidov
f4a48cd4d6 Remove cruft 2022-09-17 22:16:31 +02:00
Tanya Bragin
eb61db3b67 initial changes to close #37492 2022-08-08 19:45:00 -07:00
Alexey Milovidov
989a5ad35e More cases for parseDateTimeBestEffort 2022-02-01 03:29:27 +03:00
benbiti
9004e98992 parseDateTimeBestEffort support Unix Timestamp with Milliseconds 2021-12-29 13:43:54 +08:00
Alexey Milovidov
29d28c531f Move code around to avoid dlsym on Musl 2021-12-24 12:25:27 +03:00
Alexey Milovidov
fe6b7c77c7 Rename "common" to "base" 2021-10-02 10:13:14 +03:00
Azat Khuzhin
2561a67fd8 Replace !__clang__ with !defined(__clang) to fix gcc builds
$ gg 'if !__clang__' | cut -d: -f1 | sort -u | xargs sed -i 's/#if !__clang__/#if !defined(__clang__)/g'
2021-04-18 23:37:50 +03:00
Vasily Nemkov
2d03d330bc Extended range of DateTime64 to years 1925 - 2238
The Year 1925 is a starting point because most of the timezones
switched to saner (mostly 15-minutes based) offsets somewhere
during 1924 or before. And that significantly simplifies implementation.

2238 is to simplify arithmetics for sanitizing LUT index access;
there are less than 0x1ffff days from 1925.

* Extended DateLUTImpl internal LUT to 0x1ffff items, some of which
  represent negative (pre-1970) time values.
  As a collateral benefit, Date now correctly supports dates up to 2149
  (instead of 2106).
* Added a new strong typedef ExtendedDayNum, which represents dates
  pre-1970 and post 2149.
* Functions that used to return DayNum now return ExtendedDayNum.
* Refactored DateLUTImpl to untie DayNum from the dual role of being
  a value and an index (due to negative time). Index is now a different
  type LUTIndex with explicit conversion functions from DatNum, time_t,
  and ExtendedDayNum.
* Updated DateLUTImpl to properly support values close to epoch start
  (1970-01-01 00:00), including negative ones.
* Reduced resolution of DateLUTImpl::Values::time_at_offset_change
  to multiple of 15-minutes to allow storing 64-bits of time_t in
  DateLUTImpl::Value while keeping same size.
* Minor performance updates to DateLUTImpl when building month LUT
  by skipping non-start-of-month days.
* Fixed extractTimeZoneFromFunctionArguments to work correctly
  with DateTime64.
* New unit-tests and stateless integration tests for both DateTime
  and DateTime64.
2021-02-24 17:08:35 +02:00
Maksim Kita
9db9ce11dc Added functions parseDateTimeBestEffortUSOrZero, parseDateTimeBestEffortUSOrNull 2021-01-27 17:10:06 +03:00
vladimir golovchenko
ed4fe206aa Fixed the parseDateTimeBestEffort*-functions to correctly handle '12 am' time. 2020-12-23 18:10:00 -08:00
nikitamikhaylov
c60c161168 add ParsingException 2020-12-23 01:02:01 +03:00
alexey-milovidov
83220b0956
Update parseDateTimeBestEffort.cpp 2020-10-30 16:00:49 +03:00
feng lv
f428675b6e fix parseDateTimeBestEffortOrNull with empty string 2020-10-30 05:42:10 +00:00
Alexey Milovidov
241017bc1f Fix error in parseDateTimeBestEffort 2020-08-07 02:52:18 +03:00
Alexey Milovidov
ace4533fae Fix assert in parseDateTimeBestEffort 2020-08-02 05:05:47 +03:00
Alexey Milovidov
9e97aab3b3 Whitespace 2020-08-02 05:00:52 +03:00
flynn
5816858403
add parseDateTimeBestEffortUS function (#12028)
* add function parseDateTimeBestEffortUS
* add test
* add doc

Co-authored-by: alexey-milovidov <milovidov@yandex-team.ru>
2020-07-05 21:09:20 +03:00
Vasily Nemkov
403aae9126 Fixed parseDateTime64BestEffort implementation
Fixed argument resolution issues.
Added tests and made sure -orNull and -orZero variants alwo work correctly.
2020-05-21 17:21:39 +03:00
alexey-milovidov
3f1658c0e9
Update parseDateTimeBestEffort.cpp 2020-04-12 22:35:23 +03:00
Alexey Milovidov
142087c4f7 Fix "parseDateTimeBestEffort" for strings in RFC-2822 when day of week is Thuesday or Thursday #10082 2020-04-12 22:34:04 +03:00
Alexey Milovidov
8cb4dd275a Remove default argument (harmful) #10082 2020-04-12 22:23:59 +03:00
Alexey Milovidov
d4a3ef2fdc Fixed wrong code (no changes in behaviour) 2020-04-12 19:16:02 +03:00
Ivan Lezhankin
06446b4f08 dbms/ → src/ 2020-04-03 18:14:31 +03:00