Commit Graph

122 Commits

Author SHA1 Message Date
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
kigerzhang
e1c9b8c155 Add new functionality to the function FormatDataTime 2023-01-31 10:20:59 +08:00
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
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
298a7055fa Replace time_t with DateLUTImpl::Time 2022-12-02 16:40:36 +00:00
Roman Vasin
96d7cf319b
Merge branch 'master' into ADQM-623 2022-11-30 19:25:53 +03:00