Nikita Mikhaylov
82ba97c3a7
More explicit template instantiations ( #60730 )
2024-03-07 17:16:13 +01:00
Robert Schulze
a8671049e1
Various smaller fixups
2023-11-27 08:49:54 +00:00
Azat Khuzhin
315906b380
Add ability to parse hours/months without leading zeros
...
Recently I was looking into one dataset, that has such format.
So I've changed the meaning of the following formatters for
formatDateTime()/parseDateTime(), like in other implementations [1]:
- %l/%k - to handle hours without leading zeros
- %c - handle months without leading zeros
[1]: https://www.php.net/strftime
And since this is kind of behaviour change (even though it is unlikely
will break something), there is a new setting to control this new
behaviour:
- parsedatetime_enable_format_without_leading_zeros=1 (default ON)
- formatdatetime_enable_format_without_leading_zeros=0 (default OFF, since this could change users output)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-11-26 19:10:17 +01:00
Alexey Milovidov
8c253b9e3e
Remove C++ templates
2023-11-10 05:25:02 +01:00
Robert Schulze
7f534716ff
Fix fuzzer crash in parseDateTime()
2023-08-23 20:08:27 +00:00
Alexey Milovidov
22a2fa097f
Improve error messages
2023-07-24 19:40:02 +02:00
Alexander Tokmakov
495325f664
fix some bad error messages, suppress others
2023-05-02 17:55:42 +02:00
Robert Schulze
4e52dc672e
Merge pull request #48420 from ClickHouse/rs/f
...
MySQL compat: Implement %f in parseDateTime()
2023-04-11 14:12:02 +02:00
Robert Schulze
c3f976c58a
Move space check out of loop
2023-04-11 06:19:10 +00:00
Robert Schulze
b7be5fd89e
Improve code and tests
2023-04-06 08:47:38 +00:00
Robert Schulze
ce2692ba79
Merge pull request #47246 from ClickHouse/rs/m
...
Change the behavior of formatter %M in function formatDateTime() from minutes to month name
2023-04-06 09:19:50 +02:00
Robert Schulze
809a7fbb7a
Incorporate more review feedback
2023-04-05 19:43:30 +00:00
Robert Schulze
a59b53775c
Fix style
2023-04-05 10:43:55 +00:00
Robert Schulze
0d5d2a9b55
Implement %f in parseDateTime()
...
Fixes : #48394
@cc OP
2023-04-05 09:13:18 +00:00
Robert Schulze
3315acd122
Merge pull request #48222 from ClickHouse/rs/no-default-format-string
...
parseDateTime[InJodaSyntax](): Require format argument
2023-04-01 16:59:33 +02:00
Alexander Gololobov
ae0707ba01
Remove unused error codes
2023-03-31 17:23:42 +02:00
Robert Schulze
9094772712
Replace manual checking by validateFunctionArgumentTypes()
2023-03-31 14:22:10 +00:00
Robert Schulze
8b2fc8a40a
parseDateTime[InJodaSyntax](): Require format argument
...
Function parseDateTime[InJodaSyntax]() previously accepted an
(undocumented) default format string. The problem was that
1. there is no "natural" default format
2. MySQL str_to_date() (= the motivation for
parseDateTime[InJodaSyntax]()) also provides no default format.
--> get rid of the default format
2023-03-30 12:25:55 +00:00
Robert Schulze
2df32324af
MySQL compatibility: Make str_to_date alias case-insensitive
...
MySQL doesn't care about the case
2023-03-30 12:06:20 +00:00
Robert Schulze
37effb4fa2
Merge remote-tracking branch 'origin/master' into rs/m
2023-03-28 08:51:12 +00:00
Robert Schulze
3701fda6b1
Add str_to_date() alias for MySQL compat
...
Fixes #43755
2023-03-27 14:52:32 +00:00
Robert Schulze
3db38dbb5a
Replace mySQL date formatter M behavior from minutes to month name
2023-03-27 14:00:51 +00:00
Robert Schulze
22da93e239
Cosmetics
2023-03-27 14:00:44 +00:00
Robert Schulze
f9d473a94d
parseDateTime(): Fix UB (signed integer overflow)
2023-03-26 20:02:38 +00:00
taiyang-li
e07114a6e3
fix overflow issue of readNumberWithVariableLength
2023-03-23 12:13:51 +08:00
taiyang-li
db6efaa339
fix failed uts
2023-03-22 16:53:47 +08:00
taiyang-li
d850c5a526
change as request
2023-03-22 16:45:46 +08:00
taiyang-li
96413e528c
commit again
2023-03-21 00:24:06 +08:00
taiyang-li
3ca789b4a2
changes as requested
2023-03-20 23:58:37 +08:00
taiyang-li
c77ed91319
change as request
2023-03-20 23:20:57 +08:00
taiyang-li
5723e1f3a3
fix code style
2023-03-07 16:24:00 +08:00
taiyang-li
ea73f68ab4
rename symbols
2023-03-07 15:50:11 +08:00
taiyang-li
b303fb5630
finish docs
2023-03-07 15:30:38 +08:00
taiyang-li
6eafdc57a3
fix failed uts
2023-03-07 14:35:50 +08:00
taiyang-li
1ab4ef0ffa
add some comments
2023-03-07 11:45:32 +08:00
taiyang-li
3979ad1348
remove usedless vectors
2023-03-06 17:35:08 +08:00
taiyang-li
89a2329e62
change as requested
2023-03-06 17:08:55 +08:00
taiyang-li
4fc1f131d3
change as requested
2023-03-06 12:39:02 +08:00
taiyang-li
d7cb43a20b
change as requested
2023-03-05 16:24:05 +08:00
taiyang-li
6feee40ee9
change as request
2023-03-03 10:42:35 +08:00
taiyang-li
09a3bad3e0
remove std::cout
2023-03-02 17:01:16 +08:00
taiyang-li
b5a24b34fd
fix fast tests
2023-03-02 16:58:34 +08:00
taiyang-li
e85c4f1d3a
fix code styles and typos
2023-03-01 20:24:50 +08:00
taiyang-li
d7b83608c5
finish performance profile
2023-03-01 17:15:29 +08:00
taiyang-li
d47452a1e5
remove useless code
2023-03-01 11:25:38 +08:00
taiyang-li
573c674dc2
refactor some functions
2023-03-01 11:02:41 +08:00
taiyang-li
ad48ad3787
some refactor works
2023-02-28 23:02:02 +08:00
taiyang-li
8d33a961ab
fix all bugs
2023-02-28 20:42:16 +08:00
taiyang-li
fe9c4ea0ce
add test of joda syntax
2023-02-28 17:27:59 +08:00
taiyang-li
beced6fd52
fix all bugs in mysql syntax
2023-02-28 14:52:13 +08:00