Commit Graph

132 Commits

Author SHA1 Message Date
Robert Schulze
92f0c7e522
Move DAYS_BETWEEN_YEARS_0_AND_1970 back to indicate the relation to ToDaysSinceYearZero 2023-11-02 20:58:53 +00:00
Joanna Hulboj
087cf431a7 Stub of function fromDaysSinceYearZero 2023-10-31 21:00:11 +00:00
zvonand
35baf7792d cleanup after rebase, add [[unlikely]] 2023-10-26 23:56:45 +02:00
zvonand
0766c73aab Rename date_time_overflow_mode -> date_time_overflow_behavior, moved it to format settings 2023-10-25 23:11:13 +02:00
zvonand
5b86e8c714 updated after review 2023-10-25 23:10:58 +02:00
zvonand
2f3695add8 Introduce setting for dt overflow exception
Added tests and docs
2023-10-25 23:10:24 +02:00
Robert Schulze
f7cf512824
Merge pull request #55589 from rschu1ze/string-args-in-week-functions
MySQL compatibility: `toDayOfWeek()` now supports string arguments
2023-10-16 09:07:01 +02:00
Alexey Milovidov
a904ee970f KeyCondition: preparation 2023-10-14 04:32:25 +02:00
Robert Schulze
bb0ff98f5e
String argument support for toDayOfWeek(), toWeek() and toYearWeek() 2023-10-13 10:30:37 +00:00
Robert Schulze
af911dd186
Refactorings 2023-10-13 09:48:32 +00:00
Robert Schulze
0e1aed2a38
Merge pull request #55327 from rschu1ze/to_start_of_interval_hours
Refactorings and better documentation for `toStartOfInterval()`
2023-10-08 22:33:12 +02:00
Robert Schulze
38c64b3cd1
Fix tests 2023-10-08 14:26:31 +00:00
Robert Schulze
3f33c32684
Fix style 2023-10-08 10:46:28 +00:00
Robert Schulze
4b7ffa52c5
Refactorings 2023-10-07 16:45:52 +00:00
Robert Schulze
a7c4efb845
Simpler 2023-09-22 13:13:55 +00:00
Robert Schulze
7f82765787
Some fixups 2023-09-22 11:52:02 +00:00
slvrtrn
4d3b127a1f clang-format to resolve style issues 2023-09-21 16:16:03 +02:00
slvrtrn
e2649b5e1d Remove unnecessary function 2023-09-20 18:08:02 +02:00
slvrtrn
859e1a266e toDaysSinceYearZero DateTime/DateTime64 support 2023-09-20 17:59:37 +02:00
Robert Schulze
caadfe393b
Fixes 2023-09-10 13:34:02 +00:00
Robert Schulze
1ce84774f0
Implement toDaysSinceYearZero() / to_days() (MySQL alias)
Fixes: #54277
2023-09-09 16:59:39 +00:00
Robert Schulze
0a05831839
Cosmetics 2023-09-09 16:52:42 +00:00
Dmitry Kardymon
a644317f57 Revert "Merge pull request #52129 from ClickHouse/revert-51291-ADQM-868"
This reverts commit 1b9bcae68e, reversing
changes made to 7284749d05.
2023-07-16 18:07:22 +00:00
Alexey Milovidov
9307e60c20
Revert "Millisecond and microsecond support in date_diff / age functions" 2023-07-14 23:21:26 +03:00
Dmitry Kardymon
3237169c9a Merge remote-tracking branch 'origin/master' into ADQM-868 2023-07-10 13:24:17 +00:00
Han Fei
2e5643cc41 use UTC LUT 2023-07-05 11:57:18 +02:00
Han Fei
9544c035b9 Revert "refine"
This reverts commit 7f1ee68c87.
2023-07-05 11:15:31 +02:00
Han Fei
7f1ee68c87 refine 2023-07-04 23:08:54 +02:00
Han Fei
ca6930eb11
Revert "Revert "Merge pull request #50951 from ZhiguoZh/20230607-toyear-fix"" 2023-07-04 17:38:53 +02:00
Dmitry Kardymon
ed16828b70 Merge remote-tracking branch 'clickhouse/master' into ADQM-868 2023-07-04 08:18:57 +03:00
Dmitry Kardymon
c85ade9c27 Add const multiplier 2023-06-26 07:44:19 +00:00
Alexey Milovidov
477b707ff1 Revert "Merge pull request #50951 from ZhiguoZh/20230607-toyear-fix"
This reverts commit 6bbd0d144d, reversing
changes made to 74cb79769b.
2023-06-26 02:02:24 +02:00
Dmitry Kardymon
d58152cb82 Add constants / fix tests 2023-06-21 08:04:40 +00:00
Dmitry Kardymon
cda37f4d73 Fix negative support for date_diff/age(), fix whole int TransformDateTime64 2023-06-20 18:31:04 +00:00
Dmitry Kardymon
792cdb6da5 Add millisecond support to age() / add tests 2023-06-20 08:26:59 +00:00
Dmitry Kardymon
02b5b50e41 Add milli/micro seconds support for date_diff 2023-06-16 12:39:46 +00:00
Zhiguo Zhou
d780d0bab1 fix style
Move error throws in Transform to FunctionDateOrDateTimeToSomething.
2023-06-15 21:48:02 +08:00
Han Fei
9e81b2fd5d fix style 2023-06-15 21:48:02 +08:00
Zhiguo Zhou
d14299eb09 The general optimization of predicates with date/datetime converters
As is suggested in issue #15257, the function preimage is a general
solution to the optimization problem with predicates containing the
date and datetime converters. This commit implements the idea by
adding the new methods, hasInformationAboutPreimage and getPreimage,
to IFunction/IFunctionBase, and having the specific convert functions
define their own preimage. Moreover, we added a new pass in the
TreeOptimizer and a new AST visitor for in-place rewriting the AST
with the converters' preimage.

Specifically, the optimization is applied to toYear and toYYYYMM.
2023-06-15 21:48:02 +08:00
Dmitry Kardymon
7a02a70ad4 Add value to exceptions text 2023-06-09 11:11:49 +00:00
Dmitry Kardymon
de70e322cf Fix by pull request comments 2023-06-09 10:29:44 +00:00
Dmitry Kardymon
7263769d20 Add constexpr / fix date check 2023-06-08 06:12:54 +00:00
Dmitry Kardymon
cf886d8ced Remove IsConvertible() 2023-06-06 11:08:21 +00:00
Dmitry Kardymon
fa5f890a7a Added ru function descriptions (docs) 2023-06-02 12:03:50 +00:00
Dmitry Kardymon
a22e80eed5 Remove whitespaces 2023-06-01 19:52:48 +00:00
Dmitry Kardymon
38abcd1c44 Add nullable support to DateTimeTransformImpl 2023-06-01 19:25:53 +00:00
Dmitry Kardymon
54d526c75c Add cast type supprt to DateTimeTransformImpl 2023-06-01 14:22:57 +00:00
Antonio Andelic
914e0fbb0a Fix monotonic check with DateTime64 2023-03-13 16:30:32 +00:00
kigerzhang
46161bc4e9 fix style 2023-02-07 10:03:03 +08:00
zk_kiger
b13eaf5e68
Merge branch 'master' into improve_format_datetime_joda 2023-02-06 19:16:10 +08:00