Commit Graph

5277 Commits

Author SHA1 Message Date
zk_kiger
886e821d1e
Merge branch 'master' into improve_format_datetime_joda 2023-02-09 10:08:29 +08:00
Alexander Tokmakov
4fd4058259
Merge pull request #45629 from arthurpassos/fix_cares_crash
Cancel c-ares failed requests and retry on system interrupts to prevent callbacks with dangling references and premature resolution failures
2023-02-09 02:29:29 +03:00
Anton Popov
62dfac1425
Merge pull request #46103 from bigo-sg/improve_pad_string
Fix doc and enable int types for pad
2023-02-08 14:24:04 +01:00
Alexander Gololobov
a7c30eecf4
Merge pull request #46141 from ClickHouse/fix-assertion-in-statistics
Fix assertion in statistical functions
2023-02-08 13:42:02 +01:00
Robert Schulze
b79ead9c84
Move poco to base/poco/ (#46075)
* Replicate poco into base/poco/

* De-register poco submodule

* Build poco from ClickHouse

* Exclude poco from stylecheck

* Exclude poco from whitespace check

* Exclude poco from typo check

* Remove x bit from sources/headers (the style check complained)

* Exclude poco from duplicate include check

* Fix fasttest

* Remove contrib/poco-cmake/*

* Simplify poco build descriptions

* Remove poco stuff not used by ClickHouse

* Glob poco sources

* Exclude poco from clang-tidy
2023-02-08 12:04:11 +01:00
Kruglov Pavel
0e5ceae896
Merge pull request #45296 from bigo-sg/improve_multi_if
Improve performance of function multiIf by columnar executing
2023-02-08 11:33:12 +01:00
Vladimir C
8385263ba9
Add in code doc to sipHash128Reference 2023-02-08 11:04:58 +01:00
kigerzhang
a6d7e37815 fix test reference 2023-02-08 15:41:17 +08:00
taiyang-li
51f565a470 fix ast fuzzer error 2023-02-08 12:13:29 +08:00
Alexey Milovidov
55c3bbb739 Fix assertion in statistical functions 2023-02-08 00:09:41 +01:00
taiyang-li
f41f41c78c fix doc; enable int type for pad 2023-02-07 18:25:36 +08:00
Salvatore Mesoraca
476342602b
Functions: Hashing: add sipHash128Reference{,Keyed} 2023-02-07 11:19:04 +01:00
kigerzhang
1dbfd5b3f4 Merge remote-tracking branch 'origin/improve_format_datetime_joda' into improve_format_datetime_joda 2023-02-07 10:05:59 +08:00
kigerzhang
46161bc4e9 fix style 2023-02-07 10:03:03 +08:00
Arthur Passos
21b6b37272 well wlel, context switching 2023-02-06 10:56:01 -03:00
Arthur Passos
bcacbc1cc6 partially fix tests 2023-02-06 10:56:01 -03:00
Arthur Passos
9250e29b67 mess, i guess all bugs are fixed and performance a bit better 2023-02-06 10:56:01 -03:00
Arthur Passos
b848189726 tmp 2023-02-06 10:56:01 -03:00
Arthur Passos
296a19129b alphanumeric as key start 2023-02-06 10:56:01 -03:00
Arthur Passos
65188a565f Remove state from Extractor. It's usually a bad idea that bites us in the future, it did. 2023-02-06 10:56:01 -03:00
Arthur Passos
89ece4ab6d escp 2023-02-06 10:56:01 -03:00
Arthur Passos
421c842a87 fix escape function 2023-02-06 10:56:01 -03:00
Arthur Passos
1104f218aa fix escape function 2023-02-06 10:56:01 -03:00
Arthur Passos
51e71bd10e move to object libs 2023-02-06 10:56:01 -03:00
Arthur Passos
304c1531c1 add control characters validation 2023-02-06 10:56:01 -03:00
Arthur Passos
ace23bacbc address comments 2023-02-06 10:56:01 -03:00
Arthur Passos
7f8d51f73e style 2023-02-06 10:56:01 -03:00
Arthur Passos
383e9264b7 improve lib cmakefiles, add state docs and minor changes 2023-02-06 10:56:01 -03:00
Arthur Passos
e1c6d15714 remove redundant base class constructor call 2023-02-06 10:56:01 -03:00
Arthur Passos
252fdcaf36 remove double whitespaces to make style happy 2023-02-06 10:56:01 -03:00
Arthur Passos
4c1d9fa177 improve docs 2023-02-06 10:56:01 -03:00
Arthur Passos
b54f82b483 throw exception on no arguments 2023-02-06 10:56:01 -03:00
Arthur Passos
1d48eaeae5 yet another loremipsum 2023-02-06 10:56:01 -03:00
Arthur Passos
3430b806de style 2023-02-06 10:56:01 -03:00
Arthur Passos
2a43f9315d add tests 2023-02-06 10:56:01 -03:00
Arthur Passos
c6fbec5d6a fix typo and remove double whitespaces from test strings just to make formatter happy 2023-02-06 10:56:01 -03:00
Arthur Passos
1b703d38a5 formatting 2023-02-06 10:56:01 -03:00
Arthur Passos
c303f644f7 formatting challenge 2023-02-06 10:56:01 -03:00
Arthur Passos
afbb4dd138 hopefully I reformatted everything 2023-02-06 10:56:01 -03:00
Arthur Passos
07a589c63f finish renaming to extractkeyvaluepairs 2023-02-06 10:56:01 -03:00
Arthur Passos
10c24c560e rename to exrtactKeyValue and improve code 2023-02-06 10:56:01 -03:00
Arthur Passos
85d1d9ab61 first test, big file 2023-02-06 10:56:00 -03:00
Arthur Passos
ed032f6440 Make KeyValuePairExtractor response generic and introduce no-op escaping processor 2023-02-06 10:56:00 -03:00
Arthur Passos
ce23a7ad9a reduce state management in lazyescapingkvpextractor by keeping part of it in state handlers 2023-02-06 10:56:00 -03:00
Arthur Passos
08c33f4766 rename methods 2023-02-06 10:56:00 -03:00
Arthur Passos
e6b97c4f85 small change 2023-02-06 10:56:00 -03:00
Arthur Passos
4fbf7177a6 add tests & incorporate ch replace function 2023-02-06 10:56:00 -03:00
Arthur Passos
c4a0993ac0 progress 2023-02-06 10:56:00 -03:00
Arthur Passos
06a6426bae progress 2023-02-06 10:56:00 -03:00
Arthur Passos
857a64c08d progress 2023-02-06 10:56:00 -03:00
Arthur Passos
61b3b244b8 Move everything to DB namespace 2023-02-06 10:56:00 -03:00
Arthur Passos
c49abad441 add value allowlist 2023-02-06 10:56:00 -03:00
Arthur Passos
30ff98d511 tmp commit 2023-02-06 10:56:00 -03:00
zk_kiger
602e697b31
Merge branch 'ClickHouse:master' into improve_format_datetime_joda 2023-02-06 20:18:23 +08:00
zk_kiger
b13eaf5e68
Merge branch 'master' into improve_format_datetime_joda 2023-02-06 19:16:10 +08:00
李扬
444373679a
Merge branch 'master' into improve_decimal 2023-02-06 13:08:51 +08:00
Joanna Hulboj
e1f345cc6b Improve behaviour of conversion into Date for boundary value 65535 - with fixed tests 2023-02-04 18:47:42 +00:00
Han Fei
061204408a
Merge pull request #45952 from ucasfl/tuple
Fix tupleElement with Null arguments
2023-02-03 16:15:54 +01:00
Antonio Andelic
cb0e338d70
Revert "Improve behaviour of conversion into Date for boundary value 65535" 2023-02-03 12:10:39 +01:00
flynn
3d9b8ba991 Merge branch 'master' of github.com:ClickHouse/ClickHouse into tuple 2023-02-03 07:48:57 +00:00
李扬
8b339611b9
Merge branch 'master' into improve_decimal 2023-02-03 11:00:19 +08:00
Alexey Milovidov
0ba246ca53
Merge pull request #45914 from jh0x/improve-into-date-from-uint16
Improve behaviour of conversion into Date for boundary value 65535
2023-02-02 18:54:53 +03:00
flynn
8513e5a721 Fix tupleElement with Null arguments 2023-02-02 08:48:13 +00:00
taiyang-li
52d5428d0a improve performance of ColumnArray::filter 2023-02-02 15:42:58 +08:00
Joanna Hulboj
e57492c214 Improve behaviour of conversion into Date for boundary value 65535 2023-02-01 18:22:06 +00:00
Yakov Olkhovskiy
f4ef21cb2f allow implicit narrowing conversion UInt64 => IPv4 2023-01-31 19:04:21 +00:00
Anton Popov
9f4658151e
Merge pull request #45799 from ClickHouse/func-iptypes-empty
Add empty/notEmpty function support for IP types
2023-01-31 13:37:23 +01:00
Robert Schulze
44a5e9cb17
Minor doc follow-up to #45382 2023-01-31 10:31:01 +00:00
Robert Schulze
fdd6c77480
Merge pull request #45382 from bigo-sg/improve_position
Add fastpath for function position when needle is empty
2023-01-31 11:22:31 +01:00
taiyang-li
d2e97fb94d remove columnar impl when instructions contains short 2023-01-31 18:13:01 +08:00
taiyang-li
2d7c357d61 implement columnar version for multiIf when instructions contains short 2023-01-31 18:00:31 +08:00
taiyang-li
4cf11d9a84 change as request 2023-01-31 10:48:02 +08:00
kigerzhang
e1c9b8c155 Add new functionality to the function FormatDataTime 2023-01-31 10:20:59 +08:00
Yakov Olkhovskiy
79d82a3587 add empty/notEmpty function support for IP types 2023-01-30 20:37:08 +00:00
Arthur Passos
7b1ceaa2c5
Merge branch 'master' into fix_cares_crash 2023-01-30 12:05:56 -03:00
Arthur Passos
513f430334 Add setting to enable/disable reverseDNSQuery function 2023-01-30 12:04:37 -03:00
Vladimir C
e7e8ae979f
Merge pull request #45271 from jh0x/feature-array-shuffle 2023-01-30 11:54:07 +01:00
Robert Schulze
66392b873c
Merge pull request #45513 from aiven-sal/aiven-sal/siphash_pr
Keyed SipHash
2023-01-30 11:10:00 +01:00
taiyang-li
c45111349f Merge branch 'master' into improve_multi_if 2023-01-30 16:32:55 +08:00
taiyang-li
d25740da83 change as request 2023-01-30 16:13:12 +08:00
taiyang-li
5db514fb05 Merge branch 'master' into improve_position 2023-01-30 15:29:32 +08:00
Robert Schulze
15ae2d1de5
Merge branch 'master' into aiven-sal/siphash_pr 2023-01-29 21:06:52 +01:00
Robert Schulze
e88aa18a8c
Fix typo 2023-01-29 20:01:30 +00:00
Arthur Passos
ebf3145598 extern bad arguments 2023-01-29 10:18:21 -03:00
Arthur Passos
f67560058d Add argument validation to reverseDNSQuerying and make stateless test more about function validation 2023-01-29 09:20:17 -03:00
Joanna Hulboj
df030a56f0 FIXUP: Remove use of legacy exceptions api 2023-01-27 21:27:09 +00:00
Joanna Hulboj
9a559b5475 FIXUP: More comments about shuffle 2023-01-27 20:07:56 +00:00
Joanna Hulboj
8791a44e01 FIXUP: Added info and test for materialized array 2023-01-27 20:07:56 +00:00
Joanna Hulboj
3b472eb2dd FIXUP: Darwin compilation issue 2023-01-27 20:07:56 +00:00
Joanna Hulboj
e1d281206f Clamp the limit for arrayPartialShuffle 2023-01-27 20:07:56 +00:00
Joanna Hulboj
b0ba8c02be FIXUP: Darwin compilation issue 2023-01-27 20:07:55 +00:00
Joanna Hulboj
d378e453c1 FIXUP: fix in arrayPartialShuffle 2023-01-27 20:07:55 +00:00
Joanna Hulboj
a8b78abc54 Added arrayPartialShuffle function 2023-01-27 20:07:55 +00:00
Joanna Hulboj
09789b027f FIXUP: PR comments 2023-01-27 20:07:55 +00:00
Joanna Hulboj
a65b2cf861 FIXUP: Simplify logic by using permute function 2023-01-27 20:07:55 +00:00
Joanna Hulboj
c09a4dd132 FIXUP: Docs into code 2023-01-27 20:07:55 +00:00
Joanna Hulboj
8d8d1bb887 FIXUP: make clang-tidy happier 2023-01-27 20:07:55 +00:00
Joanna Hulboj
01624e2f23 FIXUP: style 2023-01-27 20:07:55 +00:00
Joanna Hulboj
2355780737 Minor formatting 2023-01-27 20:07:55 +00:00
Joanna Hulboj
4adb6288eb Add arrayShuffle function 2023-01-27 20:07:55 +00:00
Arthur Passos
c586de599a string formatting 2023-01-27 14:01:34 -03:00
Arthur Passos
e559a6b1d2 address some comments 2023-01-27 12:07:00 -03:00
Alexander Tokmakov
c366806c3e
Merge pull request #45527 from ClickHouse/exception_message_patterns4
Better formatting for exception messages 2
2023-01-27 15:31:52 +03:00
Salvatore Mesoraca
59c17a7719
functions: hashing: add sipHash{64,128}Keyed 2023-01-27 13:00:54 +01:00
Salvatore Mesoraca
31e4d042f8
function: hashing: add generic support for keyed algos 2023-01-27 13:00:53 +01:00
Alexey Milovidov
5b257ab806
Merge pull request #45233 from ClickHouse/improve_week_day
Revert "Revert "Improve week day""
2023-01-27 02:44:17 +03:00
Alexander Tokmakov
68a60ad4f6 fix 2023-01-26 20:20:56 +01:00
Alexander Tokmakov
d7c697ee38 fix 2023-01-26 15:24:39 +01:00
Alexander Tokmakov
14db798191 fix 2023-01-26 13:56:16 +01:00
Arthur Passos
433eda70fd add reverseDNSQuery docs 2023-01-26 07:57:43 -03:00
Alexander Tokmakov
a584ad0eb1 forbid runtime strings 2023-01-26 10:52:47 +01:00
Alexander Tokmakov
9b670946db Merge branch 'master' into exception_message_patterns5 2023-01-26 00:41:32 +01:00
Arthur Passos
9942fe7b5b cancel ares failed requests, listen to POLLRDNORM and retry on EINTR 2023-01-25 19:07:58 -03:00
Nikolay Degterinsky
d8d85d9bbd Merge remote-tracking branch 'upstream/master' into fix-msan-build 2023-01-24 22:57:47 +00:00
Nikolay Degterinsky
fb6838b043 Review suggestions 2023-01-24 22:54:01 +00:00
Alexander Tokmakov
dceeae995e Merge branch 'master' into exception_message_patterns4 2023-01-24 23:22:38 +01:00
Robert Schulze
7f010d2b61
Merge pull request #45522 from HarryLeeIBM/hlee-s390x-transform
Fix endian issue in transform function for s390x
2023-01-24 22:12:25 +01:00
Alexander Tokmakov
dd57215934 Merge branch 'master' into exception_message_patterns4 2023-01-24 17:03:12 +01:00
Kseniia Sumarokova
dd18dd2953
Merge pull request #45341 from ClibMouse/feature/non-throwing-hastoken
Introduce non-throwing variants of hasToken
2023-01-24 15:37:36 +01:00
Alexander Tokmakov
6ecae8388e Merge branch 'master' into exception_message_patterns4 2023-01-24 14:42:36 +01:00
Nikolai Kochetov
e4c0608a01
Merge pull request #45150 from ClickHouse/fix-ip-function-mod
Binary arithmetic for IPv4
2023-01-24 13:11:02 +01:00
ltrk2
ee5818f27b Fix the build with ENABLE_VECTORSCAN disabled 2023-01-23 16:43:03 -08:00
Alexander Tokmakov
414693feb2 fixes 2023-01-24 00:46:03 +01:00
ltrk2
9710b8643c Refine the solution 2023-01-23 14:27:48 -08:00
Alexander Tokmakov
bb4c8e169f check number of parameters in format string 2023-01-23 23:16:16 +01:00
Alexander Tokmakov
3f6594f4c6 forbid old ctor of Exception 2023-01-23 22:18:05 +01:00
Alexander Tokmakov
70d1adfe4b
Better formatting for exception messages (#45449)
* save format string for NetException

* format exceptions

* format exceptions 2

* format exceptions 3

* format exceptions 4

* format exceptions 5

* format exceptions 6

* fix

* format exceptions 7

* format exceptions 8

* Update MergeTreeIndexGin.cpp

* Update AggregateFunctionMap.cpp

* Update AggregateFunctionMap.cpp

* fix
2023-01-24 00:13:58 +03:00
HarryLeeIBM
61f55ebb8a Fix endian issue in transform function for s390x 2023-01-23 11:54:35 -08:00
Nikolay Degterinsky
f9960361db Fix MSan build 2023-01-23 14:38:07 +00:00
Robert Schulze
97d1bed114
Merge branch 'master' into improve_week_day 2023-01-21 20:40:33 +01:00
Alexander Tokmakov
910d6dc0ce
Merge pull request #45342 from ClickHouse/exception_message_patterns
Save message format strings for DB::Exception
2023-01-20 18:46:52 +03:00
ltrk2
810c9ba50c Produce a null map of the correct size 2023-01-20 10:24:42 -05:00
ltrk2
9d798ea1bc Document functions 2023-01-20 10:24:42 -05:00
ltrk2
65b9c69c90 Introduce non-throwing variants of hasToken 2023-01-20 10:24:42 -05:00
Alexander Tokmakov
ec5d7d0a3a
Update src/Functions/FunctionsConversion.h
Co-authored-by: Alexander Gololobov <440544+davenger@users.noreply.github.com>
2023-01-20 17:33:01 +03:00
taiyang-li
01048c6568 change as request 2023-01-20 17:05:28 +08:00
Anton Popov
089d1f5b62 fix fuzzer 2023-01-19 17:03:24 +00:00
Anton Popov
7f2e37860d allow to convert float stored in string field to integer in JSONExtract 2023-01-19 14:24:55 +00:00
taiyang-li
8d63dc2608 fix tests 2023-01-18 20:13:26 +08:00
taiyang-li
1c120ee751 add fastpath for vectorConstant when needle is empty 2023-01-18 15:13:47 +08:00
Alexander Tokmakov
5cd90c1a3e Merge branch 'master' into exception_message_patterns 2023-01-17 20:04:04 +01:00
Alexander Tokmakov
72e8615bec formatting of some exception messages 2023-01-17 20:03:56 +01:00
taiyang-li
54d2ae4a78 add some debug logs 2023-01-17 14:44:33 +08:00
taiyang-li
d23e456f9e remove no_inline 2023-01-17 11:41:49 +08:00
taiyang-li
9d2844e689 last optimization: convert memcpy to assign operation of fixed type T 2023-01-17 11:40:06 +08:00
taiyang-li
3b4ac825ba another optimization: adjuest type of inserts according to the size of instructions, which makes more parallalism 2023-01-17 11:27:28 +08:00
Alexander Tokmakov
522686f78b less empty patterns 2023-01-17 01:19:44 +01:00
Alexander Tokmakov
870cfcc36a less fmt::runtime usages 2023-01-17 00:11:59 +01:00
taiyang-li
87f869a129 reorder branches 2023-01-16 21:02:33 +08:00
taiyang-li
5b3f9eb62e vectorize function calculateInserts 2023-01-16 20:35:26 +08:00
Robert Schulze
ff493c439c
Merge pull request #45244 from bigo-sg/improve_like
Add fast path for col like '%%' or col like '%'  or match(col, '.*')
2023-01-16 08:36:20 +01:00
taiyang-li
4448bfe8a7 try to improve performance of function multiif 2023-01-16 15:08:12 +08:00
taiyang-li
2f7ea79d94 change as request 2023-01-16 10:42:58 +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
Robert Schulze
9779d034eb
Merge pull request #45144 from ClibMouse/crc-power-fix
Changes to support the CRC32 in PowerPC.
2023-01-13 11:24:18 +01:00
taiyang-li
de5474c9f9 optimize match(a, '.*') 2023-01-13 14:55:54 +08:00
taiyang-li
45df745011 add fast path for like '%%' or like '%' 2023-01-13 12:20:03 +08: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
MeenaRenganathan22
28d5c3cf7f Addressed the review comments 2023-01-11 17:00:10 -08:00
MeenaRenganathan22
5fa5ae8099 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into crc-power-fix 2023-01-11 09:31:41 -08:00
Robert Schulze
9bb1e31369
Merge pull request #44860 from bigo-sg/improve_week_day
update function DAYOFWEEK and add new function WEEKDAY for mysql/spark compatiability
2023-01-11 13:58:45 +01:00
Yakov Olkhovskiy
92caf20323 binary arithmetic for IPv4 2023-01-11 08:59:27 +00:00
MeenaRenganathan22
25c94dfa83 Changes to support the CRC32 in PowerPC to address the WeakHash collision issue. Update the reference to support the hash values based on the specific platform 2023-01-10 21:20:13 -08:00
Yakov Olkhovskiy
9e327306a3
Merge pull request #45043 from ClickHouse/fix-ip-function-hash
Fix hash functions for IPv4
2023-01-10 07:48:12 -05:00
taiyang-li
09c1cecb01 fix build error 2023-01-10 10:56:13 +08:00
Yakov Olkhovskiy
2559c49810 make only IPv4 as numeric, fix hash functions for IPv6, add more hash functions to test 2023-01-10 02:03:06 +00:00
Alexey Milovidov
d6748f9fae
Merge pull request #45065 from ClickHouse/fix-low-cardinality-in-nested-lambda-capture
Fix Cannot capture column for nested lambda with LowCardinality
2023-01-10 04:50:46 +03:00
Nikolai Kochetov
86324e231c Fix Cannot capture column for nested lambda with LowCardinality 2023-01-09 14:57:09 +00:00
taiyang-li
4bc2c61406 change as request 2023-01-09 20:37:16 +08:00
taiyang-li
64bbdee824 fix stule 2023-01-09 19:36:51 +08:00
taiyang-li
20c7c0b1ef change as request 2023-01-09 18:21:31 +08:00
Yakov Olkhovskiy
6ec1592a9f fix hash functions for IPv4 2023-01-08 20:58:09 +00:00
Alexey Milovidov
13a045dce4 Fix bad code: postfix increment, multiple effects in one statement 2023-01-08 02:55:02 +01:00
Alexey Milovidov
56d8c4730e Fix function range 2023-01-08 02:50:28 +01:00
Yakov Olkhovskiy
d77178194f fix cutIPv6 function and IPv4 hashing 2023-01-07 21:48:02 +00:00
Anton Popov
1f32ffedf8
Merge pull request #43221 from ClickHouse/refactoring-ip-types
Replace domain IP types (IPv4, IPv6) with native
2023-01-07 12:01:21 +01:00
Yakov Olkhovskiy
1be48f706b
Merge pull request #43706 from ClibMouse/s390x_crc32
s390x weakhash32 support
2023-01-05 14:45:20 -05:00
Yakov Olkhovskiy
7a5a36cbed
Merge branch 'master' into refactoring-ip-types 2023-01-04 11:11:06 -05:00
Kruglov Pavel
59263f3ae1
Merge pull request #44501 from Avogar/validate-types
Validate data types according to settings.
2023-01-04 14:48:09 +01:00
Nikolay Degterinsky
aa41e9b775
Merge pull request #44857 from evillique/fix-msan-build
Try to fix MSan build
2023-01-04 04:31:28 +01:00
Alexey Milovidov
fb68fc1bee
Merge pull request #44870 from ClickHouse/fix_flaky_test
Fix flaky test and several typos
2023-01-04 05:14:14 +03:00
Alexey Milovidov
3a027d285f
Merge pull request #44828 from ClickHouse/remove-two-lines-of-code
What if I will remove two lines of code?
2023-01-04 04:50:52 +03:00
Kruglov Pavel
826d11bfb1
Merge branch 'master' into validate-types 2023-01-04 01:22:12 +01:00
Nikolay Degterinsky
c6daf0a6eb Merge remote-tracking branch 'upstream/master' into ulid 2023-01-03 19:58:50 +00:00
Nikolay Degterinsky
fc54ee5faf Add comment about the reason for a separate file 2023-01-03 19:43:25 +00:00
Robert Schulze
cfb6feffde
What happens if I remove these 139 lines of code? 2023-01-03 18:35:31 +00:00
Alexey Milovidov
bdd3ef8920
Merge pull request #44830 from ClickHouse/fix-monotonicity-fuzz-2
Fix fuzzer report
2023-01-03 19:42:58 +03:00
alesapin
6c8dbcc040 Fix flaky test 01459_manual_write_to_replicas_quorum_detach_attach and several typos 2023-01-03 16:27:51 +01:00
Robert Schulze
421473e974
Merge pull request #44421 from ClickHouse/revert-of-revert-of-age-function
Revert revert of age function
2023-01-03 10:02:18 +01:00
Nikolay Degterinsky
c4431e9931 Fix MSan build 2023-01-03 02:21:26 +00:00
Alexey Milovidov
fcefaa602f Fix error 2023-01-03 01:24:56 +01:00
Alexey Milovidov
fa16abe05e Fix error 2023-01-03 01:23:57 +01:00
Alexey Milovidov
e855d3519a
Merge branch 'master' into refactoring-ip-types 2023-01-02 21:58:53 +03:00
Nikita Taranov
563b27f648
Provide monotonicity info for toUnixTimestamp64* (#44116)
* impl

* fix
2023-01-02 16:34:06 +01:00
Kruglov Pavel
0a43976977
Merge branch 'master' into validate-types 2023-01-02 16:10:14 +01:00
Kruglov Pavel
966f57ef68
Merge pull request #42777 from Avogar/improve-streaming-engines
Refactor and Improve streaming engines Kafka/RabbitMQ/NATS and data formats
2023-01-02 15:59:06 +01:00
Robert Schulze
24a3085251
Merge pull request #44527 from mrcrypster/patch-3
Fixed minor errors in functions docs
2023-01-02 15:05:59 +01:00
Robert Schulze
545576fe01
Merge pull request #43818 from bigo-sg/improve_from_unixtime
Add new functions to format datetime in joda datetime style
2023-01-02 13:41:50 +01:00
Alexey Milovidov
d95aca1b32 Fix fuzzer 2023-01-02 01:51:50 +01:00
Alexey Milovidov
e20eb570c5 Fix bad cast in monotonicity analysis 2023-01-01 20:42:15 +01:00
Kruglov Pavel
894726bd8f
Merge branch 'master' into improve-streaming-engines 2022-12-29 22:59:45 +01:00
Nikolay Degterinsky
945d50af87 Fix build 2022-12-29 02:17:52 +00:00
taiyang-li
5ae280611b merge master and solve conflict 2022-12-28 14:44:10 +08:00
Nikolay Degterinsky
7bb8db4bb3 Add generateULID function 2022-12-28 00:54:50 +00:00
avogar
411f98306a Merge branch 'master' of github.com:ClickHouse/ClickHouse into validate-types 2022-12-27 19:24:15 +00:00
Kruglov Pavel
f95eabc192
Merge pull request #44469 from Avogar/low-card-if
Don't execute and/or/if/multiIf on LowCardinality dictionary
2022-12-27 16:59:42 +01:00
Alexey Milovidov
3a4d4703d6 Fix "too large allocation" message from MSan 2022-12-26 21:21:58 +01:00
Alexander Gololobov
0788269c25
Merge pull request #44410 from ClickHouse/fix_unicode_bar
Fix buffer overrun in UnicodeBar::render
2022-12-23 13:17:24 +01:00
Denys Golotiuk
3d340efd7c
Fixed minor errors in functions docs 2022-12-23 12:05:04 +02:00
Duc Canh Le
188de7969a fix error code 2022-12-23 10:25:37 +08:00
Duc Canh Le
475d06b216
Merge branch 'master' into ch_canh_fix_lc_in 2022-12-23 10:12:15 +08:00
Duc Canh Le
a3a601ff85 fix style 2022-12-23 10:06:43 +08:00
Dmitry Novik
cff882d506 Merge remote-tracking branch 'origin/master' into refector-function-node 2022-12-22 21:34:29 +00:00
Alexander Gololobov
0ae7f03516
Merge branch 'master' into fix_unicode_bar 2022-12-22 14:53:33 +01:00
Vladimir C
9a38911d5d
Merge pull request #43239 from bigo-sg/array_join_support_map 2022-12-22 12:18:34 +01:00
Duc Canh Le
24d7d9de90
Merge branch 'master' into ch_canh_fix_lc_in 2022-12-22 19:11:22 +08:00
Duc Canh Le
29f3af86ec remove junk logs 2022-12-22 18:23:44 +08:00
Vladimir C
6a0210fb0f
Merge pull request #43785 from mo-avatar/binhexstringliterals 2022-12-22 10:56:18 +01:00
Duc Canh Le
9083091ee5 fix LC in bug 2022-12-22 16:20:25 +08:00
Yakov Olkhovskiy
a8cb29da4b
Merge branch 'master' into refactoring-ip-types 2022-12-21 23:56:24 -05:00
avogar
41c63152cf Don't check internal CAST 2022-12-21 23:47:56 +00:00
avogar
4ab3e90382 Validate types in table function arguments/CAST function arguments/JSONAsObject schema inference 2022-12-21 21:21:30 +00:00
Alexander Gololobov
269700df42
Merge branch 'master' into feature/format-datetime-fractional-second 2022-12-21 21:34:46 +01:00
Alexander Gololobov
92c609eb2c Fix case with DateTime64 with precision=0; do not split decimal again in every instruction 2022-12-21 21:00:39 +01:00
Kruglov Pavel
5e01a3d74e
Merge branch 'master' into improve-streaming-engines 2022-12-21 10:51:50 +01:00
Kruglov Pavel
1bedd57355
Merge pull request #44241 from ClibMouse/bugfix/subtract-subseconds
Bring interval subtraction from datetime in line with addition
2022-12-21 10:30:07 +01:00
taiyang-li
091cebf861 fix clang-tidy warning 2022-12-21 12:20:08 +08:00
avogar
a7129332af Don't execute and/or/if/multiIf on LowCardinality dictionary 2022-12-20 22:07:59 +00:00
Dmitry Novik
4793412887
Merge branch 'master' into refector-function-node 2022-12-20 18:26:19 +01:00
Sema Checherinda
7627786af7
Merge pull request #43733 from wineternity/issue_43333
Add support for signed arguments in range() #43333
2022-12-20 13:56:02 +01:00
Robert Schulze
3f03b0b53d
Revert "Revert "Add function 'age'""
This reverts commit 4549b14027.
2022-12-20 10:18:43 +00:00
Alexander Gololobov
2ab6b7d033 Check remaining space to avoid buffer overruns; some cleanups 2022-12-20 02:39:44 +01:00
Alexey Milovidov
2fc2fecd5d
Merge pull request #44193 from ClickHouse/igor/block_number_relaxed_counter
Make atomic counter relaxed in blockNumber()
2022-12-18 06:45:23 +03:00
Alexey Milovidov
a3dc5e8b0a
Merge pull request #44132 from azat/bump-libdivide
Bump libdivide (to gain some new optimizations)
2022-12-17 04:07:08 +03:00
Alexey Milovidov
d7cf0915c8
Merge pull request #44242 from jh0x/fix-use-after-free-blake3
Fixed use-after-free of BLAKE3 error message
2022-12-17 03:21:16 +03:00
Dmitry Novik
875a24a650 Merge remote-tracking branch 'origin/master' into refector-function-node 2022-12-16 16:07:30 +00:00
李扬
6ce9c7b8c2
Merge branch 'master' into improve_from_unixtime 2022-12-16 15:05:20 +08:00
avogar
755b08a49e Fix comments 2022-12-15 19:47:10 +00:00
Kruglov Pavel
c5b2e4cc23
Merge branch 'master' into improve-streaming-engines 2022-12-15 18:44:35 +01:00
Zhiguo Zhou
8b20e9f505
Vectorize AssociativeGenericApplierImpl::apply (#43669)
* Vectorize AssociativeGenericApplierImpl::apply

This commit achieved the auto-vectorization by redefining numerical
values of ternary representations and corresponding implementations
of And/Or operators, caching the intermediate ternary values in a
continuous range of memory for the SIMD instructions to consume,
and removing the short-circuit for the ternary logic evaluation.

* Optimize TernaryValueBuilder for ColumnNullable

The numerical representation of a ColumnNullable is calculated from
the data column of any data type and the null map column of UInt8
with a bitwise operation expression, which is efficient for auto-
vectorization. However, when this expression is applied to a data
column of a type other than UInt8, the SIMD register is not fully
utilized due to the mismatch of data types, and the data throughput
regresses.

To optimize the SIMD register usage, the has_value flag is firstly
evaluated from the data column and stored in a UInt8 array. Then it
is loaded from memory before the calculation of bitwise operation
expression, so that the types of the operands are both UInt8.
2022-12-15 18:27:19 +01:00
Alexey Milovidov
d835bfe416
Merge branch 'master' into fix-use-after-free-blake3 2022-12-15 06:15:14 +03:00
李扬
db0091d5f2
Merge branch 'master' into improve_from_unixtime 2022-12-15 10:11:32 +08:00
李扬
873f4b6e61
Merge branch 'master' into array_join_support_map 2022-12-15 10:00:22 +08:00
Igor Nikonov
c099fa9fa3
Merge pull request #44194 from ClickHouse/igor/minor_unix_timestamp_fixes
Minor clang-tidy fixes in fromUnixTimestamp64()
2022-12-14 23:18:07 +01:00
ltrk2
47455fa1f0 Bring interval subtraction from datetime in line with addition 2022-12-14 15:39:41 -05:00
Joanna Hulboj
d32452d90c Fixed use-after-free of BLAKE3 error message
As std::string is not POD there sadly was no warning from the compiler.
2022-12-14 19:57:41 +00:00
Dmitry Novik
1df038e39c Merge remote-tracking branch 'origin/master' into refector-function-node 2022-12-14 14:55:30 +00:00
vdimir
4c17903010
update getArrayJoinDataType/getArrayJoinColumn 2022-12-14 13:02:03 +00:00
taiyang-li
26b5a74b0c
finish debug 2022-12-14 11:28:54 +00:00
taiyang-li
2f03146941
wip 2022-12-14 11:28:50 +00:00
taiyang-li
58cbd8162f Add new functions to format datetime in joda datetime style 2022-12-14 14:28:43 +08:00
Alexey Milovidov
4549b14027
Revert "Add function 'age'" 2022-12-13 23:28:09 +03:00
Vladimir C
fd1f32ceec
Merge pull request #44200 from ClickHouse/fix-error-in-decimal-functions 2022-12-13 20:02:06 +01:00
Vladimir C
5b354b1248
Fix style 2022-12-13 19:40:08 +01:00
Alexey Milovidov
bb20733120 Fix documentation after #42438 2022-12-13 19:13:37 +01:00
Igor Nikonov
7765137371 Minor fixes (local clang-tidy warnings) 2022-12-13 13:41:02 +00:00
Igor Nikonov
436de24cf8 Make atomic counter relaxed 2022-12-13 13:34:41 +00:00
Azat Khuzhin
cdfe62f303 Update libdivide
This will includes at least [1].

  [1]: https://github.com/ridiculousfish/libdivide/pull/94

v2: Define LIBDIVIDE_* macros mutually exclusive
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-12-13 10:45:01 +01:00
李扬
6e5e2d5923
Merge branch 'master' into improve_concat 2022-12-13 12:12:48 +08:00
Yakov Olkhovskiy
746cd8debd IPv6CIDRToRange to always return IPv6 so to make it backward compatible, revert test relying on this 2022-12-12 23:42:17 +00:00
Dmitry Novik
3d2fccab87
Merge branch 'master' into refector-function-node 2022-12-12 21:36:39 +01:00
ltrk2
5e7558b1a5 Correct an instance of overindexing 2022-12-12 11:53:29 -08:00
mo-avatar
e88b85178f Support SQL standard binary and hex string literals 2022-12-11 13:05:40 +08:00
yuanyimeng
1147a41524 Add support for signed arguments in range() #43333 2022-12-10 23:48:24 +08:00
Yakov Olkhovskiy
d85fe9b3cc fix style 2022-12-10 01:01:52 +00:00
Yakov Olkhovskiy
8a923e72fa parser fixed, some optimizations 2022-12-10 00:48:44 +00:00
Suzy Wang
802f633f39
Merge branch 'master' into s390x_crc32 2022-12-09 15:00:46 -05:00
ltrk2
4cbda15acf Drop toFractionalSecond 2022-12-09 07:52:27 -08:00
ltrk2
cae7a1d24a Implement formatDateTime fractional second formatter 2022-12-08 14:53:16 -08:00
Yakov Olkhovskiy
0641066183
Merge branch 'master' into refactoring-ip-types 2022-12-08 11:12:05 -05:00
Yakov Olkhovskiy
145b978431 bugfix 2022-12-08 16:09:23 +00:00
Robert Schulze
29c975ae41
Merge pull request #44011 from ClickHouse/cleanup-isdeterministic
Some cleanup of isDeterministic(InScopeOfQuery)()
2022-12-08 12:59:01 +01:00
Robert Schulze
f998d0c16b
Merge pull request #43228 from HarryLeeIBM/hlee-s390x-wide-int-order
Fix byte order issue of wide integers for s390x
2022-12-08 09:50:54 +01:00
Yakov Olkhovskiy
bf9194f405 review suggestions 2022-12-07 21:29:17 +00:00
Robert Schulze
c3effce3da
Merge branch 'master' into cleanup-isdeterministic 2022-12-07 22:28:49 +01:00
Dmitry Novik
25ecb75ca8 Merge remote-tracking branch 'origin/master' into refector-function-node 2022-12-07 18:36:50 +00:00
Robert Schulze
4abc36774e
Some cleanup of isDeterministic(InScopeOfQuery)()
In cases where the implementation simply repeates the implementation
inherited from the base class, it can be omitted.
2022-12-07 14:34:31 +00:00
李扬
c297f9d22a
Merge branch 'master' into improve_concat 2022-12-07 19:59:01 +08:00
Robert Schulze
8e07e37fe7
Update FunctionsBinaryRepresentation.cpp 2022-12-07 09:38:03 +01:00
Robert Schulze
b14de0017c
Merge pull request #43788 from arenadata/ADQM-626
Add support of array parameters in `cutURLParameter` function
2022-12-05 16:18:42 +01:00
taiyang-li
fb3c6ed691 add alias concat_ws 2022-12-05 20:55:23 +08:00
taiyang-li
a50482ecd3 rename files 2022-12-05 17:42:33 +08:00
taiyang-li
88c9438515 rename function 2022-12-05 17:38:25 +08:00
Robert Schulze
3c1a721da4
Merge branch 'master' into hlee-s390x-wide-int-order 2022-12-04 18:47:00 +01:00
Roman Vasin
a09e7fddcc
Merge branch 'master' into ADQM-626 2022-12-04 20:34:55 +03:00
Roman Vasin
bcb65eb420
Merge branch 'master' into ADQM-623 2022-12-04 20:21:27 +03:00
Dmitry Novik
15b8c48ca9 Cleanup code 2022-12-02 19:15:26 +00:00
Dmitry Novik
2c70dbc76a Refactor FunctionNode 2022-12-02 19:15:26 +00:00
Roman Vasin
c002d0944b Refactor to do erase() on small fragment 2022-12-02 17:25:55 +00:00
Roman Vasin
298a7055fa Replace time_t with DateLUTImpl::Time 2022-12-02 16:40:36 +00:00
Robert Schulze
68ac76d60e
Merge pull request #43312 from lanesket/typo-third
Fixed: Typo
2022-12-02 13:36:47 +01:00
Roman Vasin
59523864b9
Merge branch 'master' into ADQM-623 2022-12-02 15:00:09 +03:00
Roman Vasin
fe2e0987eb Remove unneeded header files 2022-12-02 11:05:54 +00:00
Antonio Andelic
f804fbb375
Merge pull request #43790 from ClickHouse/udf-substitute-cont
Polish UDF substitution visitor
2022-12-02 10:39:18 +01:00
Suzy Wang
e34af8602c
Merge branch 'master' into s390x_crc32 2022-12-01 11:02:43 -05:00
Roman Vasin
1a2bdf14fa Small refactor: renaming various vars 2022-12-01 14:09:37 +00:00
Roman Vasin
1cce8c023d Refactor cutURLParameter to work directly on result column 2022-12-01 13:02:37 +00:00
Roman Vasin
620df1ec6f
Merge branch 'master' into ADQM-623 2022-12-01 15:30:36 +03:00
Roman Vasin
80598eebc9 FIx age() for case startdate > enddate 2022-12-01 12:20:20 +00:00
Vladimir C
a03fc9293c
Merge pull request #43274 from canhld94/ch_canh_fix_array_first_last
Close https://github.com/ClickHouse/ClickHouse/issues/43160
2022-12-01 13:14:48 +01:00
Roman Vasin
cea63dbca0 Merge branch 'master' of github.com:ClickHouse/ClickHouse into ADQM-626 2022-12-01 07:32:06 +00:00
taiyang-li
cae27d9536 fix code style 2022-12-01 11:01:14 +08:00
taiyang-li
f14582334c Add function concatWs 2022-12-01 10:56:53 +08:00
Roman Vasin
96d7cf319b
Merge branch 'master' into ADQM-623 2022-11-30 19:25:53 +03:00
Roman Vasin
48d808e475 Replace is_date_diff with is_relative 2022-11-30 16:22:30 +00:00
Roman Vasin
8160b286e2 Fix bug with week parameter for age() 2022-11-30 15:26:02 +00:00
Kruglov Pavel
3a0cf5bf5b
Merge pull request #43311 from Avogar/proper-fix-lc-with-if
Fix bad cast from LowCardinality column when using short circuit function execution
2022-11-30 16:06:43 +01:00
Igor Nikonov
3869a6c8f1
Merge pull request #43466 from zzsmdfj/issue_42742_fix_date_diff_wrong_result_build_by_darwin
Fix date_diff() for hour/minute on macOS
2022-11-30 12:23:53 +01:00
Yakov Olkhovskiy
77266ea754 cleanup 2022-11-29 17:34:16 +00:00
Roman Vasin
eff768cca7 Fix seconds in age(); make specific NOLINT; fix DATEDIFF in 02477_age test 2022-11-29 15:42:44 +00:00
Roman Vasin
1630a6fcb0 Remove function description 2022-11-29 12:58:57 +00:00
Antonio Andelic
a5c396ade9 Make better 2022-11-29 09:33:42 +00:00
Roman Vasin
d4aeb9342c Add check for array type 2022-11-29 07:53:16 +00:00
Nikolay Degterinsky
e6e6afe8f7
Merge pull request #43731 from amosbird/issue_43622
Fix issue #43622
2022-11-29 02:49:38 +01:00
Yakov Olkhovskiy
4d7d9cbd0b some comments and beautification 2022-11-29 01:07:25 +00:00
Alexey Milovidov
f5c8077819
Merge pull request #43539 from ClickHouse/substitute-udf-create
Substitute UDFs in `CREATE` queries
2022-11-28 17:05:05 +01:00
Roman Vasin
b7cac89a8f Add 02483_cuturlparameter_with_arrays test 2022-11-28 16:01:29 +00:00
Roman Vasin
75b2aaad64 Use {} in exception messages 2022-11-28 15:21:57 +00:00
Yakov Olkhovskiy
770b520ded
Merge branch 'master' into refactoring-ip-types 2022-11-28 08:50:19 -05:00
Igor Nikonov
f40f3949bd Use DateLUTImpl::Time instead of Int64 2022-11-28 13:42:22 +01:00
Igor Nikonov
b4d8aea731 Merge remote-tracking branch 'origin/master' into issue_42742_fix_date_diff_wrong_result_build_by_darwin 2022-11-28 11:34:43 +01:00
Roman Vasin
532e2c50d7 Fix bug with zeros after end of values 2022-11-28 09:53:34 +00:00
Robert Schulze
143637404e
Merge pull request #43078 from ClibMouse/s390x_ip_coding
s390x ip coding functions fixes
2022-11-28 09:11:42 +01:00
Amos Bird
65ce5abb63
Fix suspicious lowcard key 2022-11-27 18:40:26 +08:00
Duc Canh Le
9585ae4aba
Merge branch 'master' into ch_canh_fix_array_first_last 2022-11-26 17:40:38 +08:00
Nikita Taranov
d1c258cf20
Add xxh3 hash function (#43411)
* impl

* try fix

* add docs

* add test

* rm unused file

* excellent
2022-11-26 00:14:08 +01:00
Alexey Milovidov
dc7742e8f9
Merge pull request #43596 from nickitat/issue_43510
Fix monotonicity check for `toString(enum)`
2022-11-25 22:15:38 +01:00
Suzy Wang
d57a8b502d s390x crc32 fix 2022-11-25 13:12:11 -08:00
Yakov Olkhovskiy
5a86a46165 add description to dictionary functions 2022-11-25 20:34:34 +00:00
Vladimir C
ff5bb69584
Merge branch 'master' into zvonand-decdiv 2022-11-25 17:05:22 +01:00
Yakov Olkhovskiy
19a01b77eb refactoring on settings for casting, dirty hack for inaccessable context in cast function (will require review), docs appended 2022-11-25 15:57:49 +00:00
Roman Vasin
d0382270e5 Make array working on tables data correctly 2022-11-25 13:44:17 +00:00
Antonio Andelic
9f0fdd780b Modify ALTER before replicating 2022-11-25 10:16:20 +00:00
Roman Vasin
7bbb32f80a Refactor code by implementation of cuURL() 2022-11-25 08:25:48 +00:00
Roman Vasin
7084fbfee3 Make iteration through array of values 2022-11-25 06:51:08 +00:00
Yakov Olkhovskiy
08456a2421 special treatment for FixedString(16) as a binary representation for IPv6 in casting to better match previous behavior, some cleanup, test fixed 2022-11-24 05:00:28 +00:00
zvonand
e8d4176f5b fix ubsan(2) 2022-11-24 03:38:16 +03:00
zvonand
d42a29ac0f fix ubsan + expand docs 2022-11-24 01:23:59 +03:00
Nikita Taranov
dc9be92733 impl 2022-11-23 23:08:14 +01:00
Antonio Andelic
c52ca6e10e Merge branch 'master' into substitute-udf-create 2022-11-23 16:08:37 +00:00
Antonio Andelic
71fb4dc889 Fix visitor 2022-11-23 16:07:25 +00:00
Antonio Andelic
981e8a3a27 Modifiy visitor 2022-11-23 13:32:36 +00:00
Antonio Andelic
e84e05d849 Modify visitor 2022-11-23 10:27:38 +00:00
Duc Canh Le
769cbc58ea
Merge branch 'master' into ch_canh_fix_array_first_last 2022-11-23 14:33:35 +08:00
Yakov Olkhovskiy
2cbe748e68 functions fixed, test fixed 2022-11-22 21:34:32 +00:00
zvonand
92100c9aa4 fix typos 2022-11-22 18:01:54 +03:00
zvonand
faef0699b6 fix issues 2022-11-22 17:30:44 +03:00
Kruglov Pavel
98d6b96c82
Merge pull request #42033 from mark-polokhov/BSONEachRow
Add BSONEachRow input/output format
2022-11-22 14:45:21 +01:00
Kruglov Pavel
62bfb5547c
Merge pull request #43368 from Avogar/fix-if-nothing
Fix possible `Cannot create non-empty column with type Nothing` in functions if/multiIf
2022-11-22 14:11:13 +01:00
Yakov Olkhovskiy
988b030bfd bug fix, refactoring IPv6 to struct with overridden comparison 2022-11-22 12:57:19 +00:00
Roman Vasin
1e10d022ce Refactor FunctionCutURLParameter is based directly on IFunction 2022-11-22 11:27:52 +00:00
zzsmdfj
21f2cffa4d fix date_diff wrong result build by darwin 2022-11-22 18:58:37 +08:00
Anton Popov
5532e3db95 Merge branch 'filesystem-function' of https://github.com/ucasfl/ClickHouse into merging-42064 2022-11-21 18:23:11 +00:00
Yakov Olkhovskiy
ee3ce9de70 bugs fixed, some optimization, cleanup, test fixed 2022-11-21 07:45:42 +00:00
Duc Canh Le
fa70e335db minor fix 2022-11-21 10:53:54 +08:00
Duc Canh Le
0ce9a94c62
Merge branch 'master' into ch_canh_fix_array_first_last 2022-11-21 10:50:37 +08:00
Yakov Olkhovskiy
fc7f4baf23 fixed IPv6CIDRToRange, fixed comparison for ColumnIPv6 2022-11-19 06:55:05 +00:00
Yakov Olkhovskiy
dbaeabcf38 fixed some bugs, some functions corrected, some tests corrected 2022-11-18 20:10:27 +00:00
avogar
47959d6a70 Allow arguments with type Nothing in functions if/multiIf 2022-11-18 14:56:06 +00:00
Suzy Wang
8dc99e8d64
Merge branch 'master' into s390x_ip_coding 2022-11-17 23:35:06 -05:00
Nikolay Degterinsky
e7e21adf17
Merge pull request #43207 from freedomDR/improve_unhex
unhex support FixedString arguments
2022-11-18 03:09:58 +01:00
Alexey Milovidov
ef1278f5c4
Merge pull request #43313 from ClickHouse/pmod
`pmod`: compatibility with Spark, better documentation
2022-11-17 17:13:45 +01:00
Kruglov Pavel
1b68f605a2
Merge pull request #42761 from AlfVII/fix-slow-json-extract-with-low-cardinality
Fixed slowness in JSONExtract with LowCardinality(String) tuples
2022-11-17 12:49:18 +01:00
Nikita Taranov
11b535d443
impl (#43283) 2022-11-17 11:17:27 +01:00
Alexey Milovidov
10d7ce9815 pmod: compatibility with Spark, better documentation 2022-11-17 05:41:03 +01:00
Raevsky Rudolf
b8e227de81
Merge branch 'master' into typo-third 2022-11-17 00:37:30 +01:00
Raevsky Rudolf
318064ccce
Fixed: Typo 2022-11-17 00:25:57 +01:00
avogar
e98ac04678 Fix bad cast from LowCardinality column when using short circuit function execution 2022-11-16 22:34:24 +00:00
flynn
9f8dcfca34
Merge branch 'master' into filesystem-function 2022-11-16 23:28:10 +08:00
Duc Canh Le
84aea78d0f fix array first / last or null with nullable column 2022-11-16 13:11:05 +08:00
李扬
6393d11dab
fix doc 2022-11-16 09:34:45 +08:00
Yakov Olkhovskiy
813cb7fb0d merge master 2022-11-15 22:46:05 +00:00
Suzy Wang
97d76771a4 update format 2022-11-15 08:53:39 -08:00
Yakov Olkhovskiy
324c3bb81e fix bin, hex 2022-11-15 04:57:08 +00:00
freedomDR
5753be7b99 remove useless head file 2022-11-15 12:33:14 +08:00
freedomDR
7fdb2f400e unhex support FixedString 2022-11-15 12:33:14 +08:00
taiyang-li
7178d80c51 Merge branch 'function_factorial' of https://github.com/bigo-sg/ClickHouse into function_factorial 2022-11-15 09:46:44 +08:00
taiyang-li
5eba20e119 modify return type from Int64 to UInt64 2022-11-15 09:46:24 +08:00
李扬
10449247fd
Merge branch 'master' into function_factorial 2022-11-15 09:34:43 +08:00
李扬
1de5bb2392
Add function canonicalRand (#43124)
* add function canonicalRand

* add perf test

* revert rand.xml
2022-11-15 00:27:19 +01:00
李扬
ef45889ecb
Add function pmod which return non-negative result based on modulo (#42755)
* add function positive_modulo

* add ducument

* fix type deduction of positive_modulo

* add function positive_modulo

* add ducument

* fix type deduction of positive_modulo

* add notice

* fix typo

* fix typo

* fix bug

* fix ub error

* fix ub error
2022-11-15 00:15:58 +01:00
HarryLeeIBM
0133444433 Fix byte order issue of wide integer for s390x 2022-11-14 10:47:32 -08:00
zvonand
0b780346cd fix typos 2022-11-14 19:26:15 +03:00
zvonand
0a7e4ff3bf fix asan 2022-11-14 17:52:17 +03:00
Yakov Olkhovskiy
9aeebf3bdf
Merge branch 'master' into refactoring-ip-types 2022-11-14 09:21:54 -05:00
Yakov Olkhovskiy
4d144be39c replace domain IP types (IPv4, IPv6) with native 2022-11-14 14:17:17 +00:00
AlfVII
3768641bf7
Merge branch 'master' into fix-slow-json-extract-with-low-cardinality 2022-11-14 15:10:03 +01:00
Kruglov Pavel
48e6d39055
Merge pull request #43178 from Avogar/fix-if
Fix function if in case of NULL and const Nullable arguments
2022-11-14 14:52:30 +01:00
Alfonso Martinez
769cef9458 Replaced str with chars directly 2022-11-14 11:51:50 +01:00
Roman Vasin
ee0baa679b Merge branch 'master' of github.com:ClickHouse/ClickHouse into ADQM-623 2022-11-14 09:45:32 +00:00
zvonand
4392d04837 fix zero result 2022-11-14 12:27:31 +03:00
李扬
bf88816da4
Merge branch 'master' into function_factorial 2022-11-14 10:30:41 +08:00
zvonand
2390d59a2b fix memory access(2) 2022-11-14 03:07:21 +03:00
zvonand
e83deedb25 fix nullptr 2022-11-13 23:07:52 +03:00
zvonand
03bdb93dd9 fix fuzzer(3) 2022-11-13 13:34:33 +03:00
Alexander Gololobov
661c5cd0ae
fixed type 2022-11-12 23:58:09 +01:00
zvonand
1ed5a6c78d fix fuzzer(2) 2022-11-13 00:27:14 +03:00
Joanna Hulboj
42de468665 Fixed unexpected behaviour of Interval types with subquery and casting 2022-11-12 19:47:06 +00:00
zvonand
fce1573320 ast fix 2022-11-12 02:07:25 +03:00
zvonand
007e883c2b one more fix 2022-11-12 01:52:36 +03:00
zvonand
faf5185b22 one more fix 2022-11-11 23:59:03 +03:00
Nikolai Kochetov
505af344c4
Merge pull request #42612 from FArthur-cmd/UTC_timestamp
Add functions for PowerBI connect
2022-11-11 17:27:29 +01:00
zvonand
142c3d438c fix 2022-11-11 18:36:11 +03:00
zvonand
8f5e0a7e7a small datatype update 2022-11-11 17:54:41 +03:00
avogar
5ec748c664 Fix function if in case of NULL and const Nullable arguments 2022-11-11 14:49:49 +00:00
Alfonso Martinez
f24991fa56 Remove pushing a last 0 in FixedStrings 2022-11-11 13:02:30 +01:00
Alfonso Martinez
5d53ec9da8 Cleaned and replace some Strings by using chars directly 2022-11-11 11:07:05 +01:00
Roman Vasin
1f2f457e56 Fix style in function doc 2022-11-11 09:41:55 +00:00
Roman Vasin
67e66e40c3 Fix DateTime64 scale problem in age() 2022-11-11 09:25:08 +00: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
61b0c9d77c Add documentation of age() into code 2022-11-11 07:34:53 +00:00
avogar
9e89af28c6 Refactor BSONEachRow format, fix bugs, support more data types, support parallel parsing and schema inference 2022-11-10 20:15:14 +00:00
Alfonso Martinez
92028756f7 Merge remote-tracking branch 'upstream/master' into fix-slow-json-extract-with-low-cardinality 2022-11-10 17:22:58 +01:00
taiyang-li
f58e960a7d update as request 2022-11-10 21:07:44 +08:00
Roman Vasin
4962df7efb Fix quarter 2022-11-10 11:37:57 +00:00
Roman Vasin
8f3a7b5024 Change algorithm into more accurate 2022-11-10 10:27:18 +00:00
Alfonso Martinez
a1fd275209 Fixed duplicated includes 2022-11-10 09:13:52 +01:00
taiyang-li
d76c271242 add missed file 2022-11-10 16:08:22 +08:00
taiyang-li
628019d9d9 Merge branch 'enable_max_splits' of https://github.com/bigo-sg/ClickHouse into enable_max_splits 2022-11-10 10:47:10 +08:00
taiyang-li
c6449a1b23 fix bug 2022-11-10 10:46:51 +08:00
Suzy Wang
6ae4843b6d Update fixes as suggested 2022-11-09 13:54:32 -08:00
zvonand
90e3aed957 Merge branch 'master' of github.com:ClickHouse/ClickHouse into zvonand-decdiv 2022-11-09 15:05:31 +03:00
李扬
9b2dd49b4a
Merge branch 'master' into enable_max_splits 2022-11-09 15:31:06 +08:00
Suzy Wang
90250ea6ec s390x ip coding functions fixes 2022-11-08 21:12:47 -08:00
Roman Vasin
44e033680e Refactor age() function 2022-11-08 16:39:40 +00:00
Nikolay Degterinsky
09aca50c3b
Merge pull request #42195 from evillique/tuple-of-intervals
Better INTERVAL parsing and execution
2022-11-08 16:21:39 +01:00
Robert Schulze
2c568df714
Merge pull request #42968 from ClickHouse/bitcast
Less use of CH-specific bit_cast()
2022-11-08 10:54:10 +01:00
Vladimir C
c4eb83408f
Merge pull request #37681 from xlwh/display_name
closes undefined
2022-11-08 10:53:58 +01:00
李扬
1728f1e436
Merge branch 'master' into enable_max_splits 2022-11-08 10:15:42 +08:00
Nikolay Degterinsky
2b286222f7
Merge branch 'master' into tuple-of-intervals 2022-11-08 00:15:35 +01:00
Roman Vasin
1d8e7728e1 Add age() function 2022-11-07 16:42:46 +00:00
Robert Schulze
58a12300ef
Update src/Functions/FunctionsStringSearch.h
Co-authored-by: Vladimir C <vdimir@clickhouse.com>
2022-11-07 16:05:48 +00:00
Robert Schulze
a8098db25d
Minor cleanups
Semantics are unchanged.

Some special case handling was changed to early-out, because of that the
indentation changed but the logic is the same as before.
2022-11-07 14:03:46 +00:00
Vladimir C
0481999e35 Fix displayName test, add doc 2022-11-07 14:34:47 +01:00
xlwh
500609ccd3 Add miscellaneous function displayName() 2022-11-07 14:34:47 +01:00
Robert Schulze
cdaf0becfe
Merge branch 'master' into bitcast 2022-11-07 09:24:52 +01:00
李扬
70fd664dd1
Merge branch 'master' into ascii_function 2022-11-07 10:30:10 +08:00
Nikolay Degterinsky
fbf891d375
Merge pull request #42774 from alexon1234/add_format_redable_decimal_size
Published formatReadableDecimalSize so it can be used as function
2022-11-05 12:34:20 +03:00
Nikolay Degterinsky
3bcf151a9a Merge remote-tracking branch 'upstream/master' into tuple-of-intervals 2022-11-04 23:09:43 +00:00
Robert Schulze
9c066e964d
Less use of CH-specific bit_cast()
Converted usage of CH-custom bit_cast to std::bit_cast if possible, i.e.
when
  sizeof(From) == sizeof(To).
(The CH-custom bit_cast is able to deal with sizeof(From) != sizeof(To).)

Motivation for this came from #42847 where it is not clear how the
internal bit_cast should behave on big endian systems, so we better
avoid that situation as much as possible.
2022-11-04 15:52:48 +00:00
Vitaly Baranov
52b1f4aed9
Merge pull request #42484 from vitlibar/mask-sensitive-info-in-logs
Mask some information in logs
2022-11-04 14:09:38 +01:00
Nikolay Degterinsky
16fc05b734
Merge branch 'master' into add_format_redable_decimal_size 2022-11-04 15:02:01 +03:00
Robert Schulze
6df8f7ef25
Merge pull request #42907 from ClickHouse/cleanup-regexpreplace
Cleanup implementation of regexpReplace(All|One)
2022-11-04 12:49:44 +01:00
Filatenkov Artur
7afc714b06
Merge branch 'master' into UTC_timestamp 2022-11-04 14:32:44 +03:00
Kruglov Pavel
e9a01a1946
Merge branch 'master' into fix-slow-json-extract-with-low-cardinality 2022-11-04 11:13:46 +01:00
李扬
fccf6c037f
Merge branch 'master' into ascii_function 2022-11-03 22:48:55 -05:00
李扬
e65b0f1c2e
Merge branch 'master' into enable_max_splits 2022-11-03 22:47:15 -05:00
zvonand
a7ab336af2 fixed types 2022-11-03 16:55:14 +03:00
Kruglov Pavel
b124875257
Merge branch 'master' into improve-streaming-engines 2022-11-03 13:22:06 +01:00
taiyang-li
f39cb41d3e change as requested 2022-11-03 16:44:57 +08:00
taiyang-li
0df7e95845 improve doc and uts 2022-11-03 16:12:19 +08:00
Alejandro
a1e158993d Added docs in the function 2022-11-03 09:04:22 +01:00
Alejandro
16bf5458f5 Published formatReadableDecimalSize 2022-11-03 09:04:22 +01:00
taiyang-li
a51a1b4394 rename alphaTokens to SplitByAlphaImpl 2022-11-03 15:06:58 +08:00
taiyang-li
5fa0968bd5 reset to original solution 2022-11-03 15:05:23 +08:00
taiyang-li
e78861ad1c Merge branch 'master' into enable_max_splits 2022-11-03 14:41:52 +08:00
taiyang-li
6770723027 modify as requested 2022-11-03 12:02:31 +08:00
taiyang-li
aeea21e4d7 Merge branch 'master' into ascii_function 2022-11-03 11:13:20 +08:00
Robert Schulze
494d6ca3df
Cleanup implementation of regexpReplace(All|One)
This is a pure refactoring, there are no semantic changes.

Cherry-picked from #42682.
2022-11-02 15:49:53 +00:00
Vitaly Baranov
e0133688bc
Merge branch 'master' into mask-sensitive-info-in-logs 2022-11-02 16:26:13 +01:00
ltrk2
14141c9071 Add support for FixedString input to base64 functions 2022-11-02 08:14:28 -04:00
FArthur-cmd
84c88ddc91 fix typos 2022-11-01 17:29:15 +00:00
FArthur-cmd
34a33d1821 add documentation for functions 2022-11-01 15:09:05 +00:00
Anton Popov
876dca48da
Merge pull request #36969 from CurtizJ/dynamic-columns-14
Support `Object` type inside other types
2022-11-01 15:20:02 +01:00
Kruglov Pavel
c3a7211c1c
Merge pull request #41502 from marcioapm/coercing-json-extract
Add coercing in JSONExtract
2022-11-01 14:52:41 +01:00
Alexander Gololobov
f67f0183f6
Merge pull request #42812 from azat/utf8-fix-followup
Fix lowerUTF8()/upperUTF8() in case of symbol was in between 16-byte boundary
2022-11-01 12:01:00 +01:00
zvonand
2f1e4bbad7 added documentation 2022-11-01 13:21:17 +03:00
zvonand
83fb05e5ca Merge branch 'master' of github.com:ClickHouse/ClickHouse into zvonand-decdiv 2022-11-01 09:03:29 +03:00
Zhiguo Zhou
d18d08bcc7
Remove short-circuit evaluation in AssociativeApplierImpl::apply (#42214)
The short-circuit evaluation was implemented when applying the
saturable operators (and, or) on a vector of ColumnUInt8. However,
its control flow would be compiled as a series of conditional
branch instructions which are hard to predict by the hardware and
at the same time hinder the vectorization optimization by the
compiler. This commit removes the short-circuit and evaluates the
whole expression.
2022-10-31 21:36:15 +01:00
zvonand
46f1847dd9 fix segfaults invalid mem access, add tests 2022-10-31 23:18:08 +03:00
Anton Popov
2ae3cfa9e0
Merge branch 'master' into dynamic-columns-14 2022-10-31 16:15:19 +01:00
Márcio Martins
399d024c2c Fix array index argument type check for JSONExtract* functions 2022-10-31 15:08:34 +01:00
Márcio Martins
c33bd7794f
Merge branch 'master' into coercing-json-extract 2022-10-31 15:04:48 +01:00
FArthur-cmd
81c1576e61 add tests 2022-10-31 13:03:13 +00:00
Vitaly Baranov
a30bfada63 Wipe passwords from backup logs too. 2022-10-31 10:50:33 +01:00
Alfonso Martinez
9e33b13737 Merge remote-tracking branch 'upstream/master' into fix-slow-json-extract-with-low-cardinality 2022-10-31 08:46:55 +01:00
Azat Khuzhin
5fe44f2736 Fix lowerUTF8()/upperUTF8() in case of symbol was in between 16-byte boundary
In lowerUTF8()/upperUTF8() there is an SSE optimization that handles
16 byte at a time, but only for ASCII, for UTF8 symbols converion will
be done by symbol.

Consider the following example:

    КВ АМ И СЖ
             ^ - offset is 15, length of sequence is 2
                 so first byte of a symbol is in first 16 bytes
                 second byte of a symbol is not ther

And in this case it will be handled incorrectly because it will try to
process oly these 16 bytes w/o looking forward.

This had been broken by #41286, before this patch it does not looks at
the row boundaries but only at the string end and so this sutation
wasn't possible.

Fixes: #42756
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 08:17:38 +01:00
Azat Khuzhin
32febf5155 Remove dead code in LowerUpperUTF8Impl::array()
AFAICS it was there before since it was possible to overrun the
expected_end, since utf8.convert() was called with "src_end - src" not
"expected_end - src".

Refs: 5a21f3908b054a0efc90c65a12fbe151c74d90dc:dbms/include/DB/Functions/FunctionsString.h
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 08:00:29 +01:00
Roman Vasin
24a4f4afe7
Merge branch 'master' into ADQM-605 2022-10-30 18:03:07 +03:00
FArthur-cmd
f5417da46b merge 2022-10-29 08:33:05 +00:00
FArthur-cmd
6cbf50a829 extract common part 2022-10-28 21:06:32 +00:00
avogar
8e13d1f1ec Improve and refactor Kafka/StorageMQ/NATS and data formats 2022-10-28 16:41:10 +00:00
Roman Vasin
5755728b33 Add Date32 and DateTime64 into exception messages 2022-10-28 13:11:09 +00:00
Roman Vasin
15f3f56812 Change 1 argument of function to first argument of function etc 2022-10-28 12:44:47 +00:00
zvonand
9e9222862d fixed division 2022-10-28 15:31:03 +03:00
Alfonso Martinez
c37b154254 Added reverted files and fixes for failing fuzzer tests 2022-10-28 12:37:59 +02:00
Vladimir C
31e8f92cd9
Merge pull request #42664 from ClickHouse/vdimir/followup-42274 2022-10-27 12:20:46 +02:00
Márcio Martins
1ca230ff6d Allow coercing in JSONExtract* functions 2022-10-27 10:26:55 +02:00
Roman Vasin
09fe9c3ed1 Use {} in exceptions 2022-10-26 16:07:56 +00:00
李扬
04f8f38580
Merge branch 'master' into ascii_function 2022-10-26 07:29:49 -05:00
Nikolai Kochetov
db422fa903
Merge pull request #42410 from ClickHouse/fix-multi-arg-monotonicity
Fix possible LOGICAL_ERROR in binary ariphmetics monotonicity.
2022-10-26 14:11:23 +02:00
vdimir
14d0f6457b
Add tests and doc for some url-related functions 2022-10-26 10:52:57 +00:00
李扬
c7e5eb756b
Update src/Functions/ascii.cpp
Co-authored-by: Vladimir C <vdimir@clickhouse.com>
2022-10-26 18:18:15 +08:00
李扬
48c37c52e6
Update src/Functions/ascii.cpp
Co-authored-by: Vladimir C <vdimir@clickhouse.com>
2022-10-26 18:18:04 +08:00
Alfonso Martinez
348e153455 Merge branch 'fix-corner-case-low-cardinality-string-from-json' into fix-slow-json-extract-with-low-cardinality 2022-10-26 11:53:12 +02:00
Alfonso Martinez
241049763b Fixed failing tests 2022-10-26 11:50:45 +02:00
taiyang-li
05b77b3e34 fix comment 2022-10-26 16:25:25 +08:00
taiyang-li
fcbc217a7d enable limits for functions using FunctionTokens 2022-10-26 16:18:32 +08:00
taiyang-li
add5360a1b implement function ascii 2022-10-26 03:02:00 -05:00
Roman Vasin
3eca9ada3b Add Date32 to formatDateTIme 2022-10-26 08:00:12 +00:00
Alexey Milovidov
2b4be633ff
Merge branch 'master' into revert-41726-fix-slow-json-extract-with-low-cardinality 2022-10-25 22:57:12 +02:00
ltrk2
2c902bbc65
Implement support for different UUID binary formats (#42108)
* Implement support for different UUID binary formats

* Declare error codes that the implementation uses

* Make single-argument constructor explicit

* Modernize parts of the solution

* Make improvements based on review comments

* Declare an error code being used
2022-10-25 21:57:50 +02:00
Alfonso Martinez
8ef07bac89 Failing case corrected and test added 2022-10-25 17:40:54 +02:00
Anton Popov
e2ff7aa261
Merge pull request #42623 from CurtizJ/fix-bad-cast
Fix bad cast in `arrayElement` with `Map` with `Nullable` values and `Nullable` index
2022-10-25 14:59:52 +02:00
Vladimir C
8fabe1515c
Merge pull request #42274 from dentiscalprum/fix_domain 2022-10-25 13:56:58 +02:00
Nikita Taranov
49f6692a2e
Adapt internal data structures to 512-bit era (#42564)
* impl

* update tests

* fix tests
2022-10-25 13:56:28 +02:00
Maksim Kita
06fe6f3c8b
Merge pull request #31796 from kitaisreal/identifier-resolver
Added Analyzer
2022-10-25 12:36:08 +03:00
Alexey Milovidov
90c62fe46e
Merge branch 'master' into revert-41726-fix-slow-json-extract-with-low-cardinality 2022-10-25 09:31:46 +02:00
Robert Schulze
efd47c9eff
Merge pull request #42476 from ClickHouse/add-datetime-typedefs
Add convenience typedefs for Date/Date32/DateTime/DateTime64 columns
2022-10-25 08:45:57 +02:00
Alexey Milovidov
c48127534b
Merge pull request #41753 from pkit/morton_coding
add Morton Coding (ZCurve)
2022-10-25 06:10:37 +02:00
Anton Popov
eed21ad4ca
Revert "Low cardinality cases moved to the function for its corresponding type" 2022-10-25 01:30:32 +02:00
Anton Popov
b58ca49f05 fix bad cast in arrayElement with Map and Nullable index 2022-10-24 17:34:46 +00:00
Robert Schulze
655233e1c5
Add convenience typedefs for Date/Date32/DateTime/DateTime64 columns 2022-10-24 16:55:41 +00:00
Sergei Trifonov
bef3c71453
Merge pull request #41726 from AlfVII/fix-slow-json-extract-with-low-cardinality
Low cardinality cases moved to the function for its corresponding type
2022-10-24 18:18:40 +02:00
Nikolai Kochetov
14e3bb6354 Another case. 2022-10-24 13:58:26 +00:00
FArthur-cmd
e0c87b2ae2 small fix 2022-10-24 12:53:10 +00:00
FArthur-cmd
93d48a2403 add functions for powerBI connection 2022-10-24 11:04:45 +00:00
Maksim Kita
fe84e871f8 Fixed build 2022-10-24 10:22:20 +02:00
Maksim Kita
504cb2b38f Added GROUPING function support 2022-10-24 10:22:20 +02:00
Maksim Kita
75885ce2e1 Added Analyzer 2022-10-24 10:22:18 +02:00
Nikolay Degterinsky
6242e93c81 Fixes & better tests 2022-10-24 02:11:08 +00:00
Azat Khuzhin
bcc8d9f9d9 Merge remote-tracking branch 'upstream/master' into build/shorten-64-to-32
* upstream/master:
  Fix strange code in date monotonicity
  Add a test
  Fix error
  Add tests
  Remove trash
2022-10-23 07:45:10 +02:00
Quanfa Fu
b07f65343d Add functions: domainRFC, topLevelDomainRFC, domainWithoutWWWRFC... 2022-10-23 12:01:26 +08:00
Alexey Milovidov
ebf330ca1a
Merge pull request #42573 from ClickHouse/remove-trash-6
Remove trash
2022-10-23 01:31:10 +02:00
Alexey Milovidov
6c69bdd34d
Merge pull request #42574 from ClickHouse/strange-date-monotonicity
Fix strange code in date monotonicity
2022-10-23 01:30:52 +02:00
Azat Khuzhin
a63dee2763 Merge remote-tracking branch 'upstream/master' into build/shorten-64-to-32 2022-10-22 23:32:15 +02:00
Robert Schulze
b746224217
Merge pull request #42554 from arenadata/ADQM-604
Add support of Date32 arguments for dateName function
2022-10-22 17:20:10 +02:00
Alexey Milovidov
7bf1f4cdfa Fix strange code in date monotonicity 2022-10-22 09:02:20 +02:00
Azat Khuzhin
dbb4f8216f Merge remote-tracking branch 'upstream/master' into build/shorten-64-to-32
Conflicts:
- src/Functions/GregorianDate.h
2022-10-22 08:20:05 +02:00
Alexey Milovidov
7fc3cd7fb0 Fix error 2022-10-22 07:38:22 +02:00
Alexey Milovidov
ef4b2b3f59 Remove trash 2022-10-22 07:25:37 +02:00
Nikolay Degterinsky
3f37636654 Merge branch 'master' into tuple-of-intervals 2022-10-22 02:44:35 +00:00
Alexey Milovidov
5fd7409ce1
Merge branch 'master' into morton_coding 2022-10-22 04:39:13 +02:00
Alexey Milovidov
acc96a5ace
Merge pull request #42464 from ClickHouse/julian_day_ubsan
Fix UBSan report in Julian Day functions
2022-10-22 04:15:12 +02:00
Azat Khuzhin
4eeb7337ed Merge remote-tracking branch 'upstream/master' into build/shorten-64-to-32
Conflicts:
- src/Common/intExp.h
- src/Functions/DateTimeTransforms.h
- src/Functions/FunctionsConversion.h
2022-10-21 22:51:56 +02:00
Azat Khuzhin
905a95e166 Review fixes
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 22:40:13 +02:00
Alexey Milovidov
592fbb3eaf
Merge pull request #42367 from ClickHouse/revert-40217
Revert #40217
2022-10-21 21:56:15 +02:00
Alexey Milovidov
3beace607b
Merge pull request #42465 from ClickHouse/decimal-asan
Fix buffer overflow in Decimal scale
2022-10-21 21:55:20 +02:00
Azat Khuzhin
3ccd5e8a18 Fix -Wshorten-64-to-32 with USE_BLAKE3
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:42 +02: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
Antonio Andelic
f3016fb86b Throw exception on invalid values 2022-10-21 09:15:24 +00:00
Alexey Milovidov
a7d2fd2cc5
Merge branch 'master' into decimal-asan 2022-10-21 01:28:34 +02:00
Alexey Milovidov
1a6fa07587 Fix clang-tidy 2022-10-21 00:08:17 +02:00
Robert Schulze
9b7294ef45
Merge remote-tracking branch 'origin/master' into revert-40217 2022-10-20 15:27:31 +00:00
Nikita Mikhaylov
9a73eb2fbb
Add functions to generate random values according to the distribution (#42411) 2022-10-20 17:25:28 +02:00
Nikolai Kochetov
0df9d2f5cc Fix tests. 2022-10-20 13:41:27 +00:00
Roman Vasin
55df097ea3 Remove extra toString in Exception formatting 2022-10-20 11:06:06 +00:00
zvonand
cf71a9b52b fix style 2022-10-20 13:55:18 +03:00
Roman Vasin
31ad33561c Add Date32 for dateName function 2022-10-20 10:53:36 +00:00
Antonio Andelic
7bb94b7643 Fix template typenames 2022-10-20 08:20:03 +00:00
Roman Vasin
885f71d5f5 Replace is_extended_result by ResultPrecision 2022-10-20 08:18:22 +00:00
zvonand
337badbf19 fix small errors 2022-10-20 00:56:52 +03:00
Nikolai Kochetov
58b6194a2d Fix another one case. 2022-10-19 15:08:00 +00:00
Alexey Milovidov
898c935d31
Update GregorianDate.h 2022-10-19 17:36:49 +03:00
Alexey Milovidov
b0dd95447d
Update src/Functions/GregorianDate.h
Co-authored-by: Antonio Andelic <antonio2368@users.noreply.github.com>
2022-10-19 17:36:08 +03:00
Nikolai Kochetov
c8f9e7bd1f Update test. 2022-10-19 14:33:37 +00:00
Constantine Peresypkin
5b3b11b517 add Morton Coding (ZCurve) 2022-10-19 15:59:25 +02:00
Roman Vasin
c0f18f29bb Remove toExtendedReplated; Add template argument is_extended_result 2022-10-19 13:23:21 +00:00
zvonand
305fc0fc81 fix style 2022-10-19 14:00:46 +03:00
Quanfa Fu
dbe68ab0a8 Fix wrong behave of domain func with URLs contains UserInfo part and '@'
When UserInfo part and '@' appear in the URL, the host after @ should
be returned. For example, when url is "https://user:pass@clickhouse.com/",
start_of_host should be char 'c' after '@', end_of_host should be '/'
other than ':'.
2022-10-19 14:27:06 +08:00
Alexey Milovidov
e5d1a1b293 Add a test 2022-10-19 03:34:16 +02:00
Alexey Milovidov
2e3a111c29 Fix UBSan in Modified Julian Day 2022-10-19 03:26:22 +02:00
Nikolai Kochetov
b109767dda Merge branch 'master' into fix-multi-arg-monotonicity 2022-10-18 14:47:33 +00:00
Kruglov Pavel
25e13bdd2f
Merge pull request #41107 from Avogar/improve-combinators
Support all combinators combination in WindowTransform/arratReduce*/initializeAggregation/aggregate functions versioning
2022-10-18 15:24:49 +02:00
zvonand
205ce45dd0 upload 2022-10-18 15:38:48 +03:00
Alfred Xu
2ac5540d0e
Fixed a logical error in case of using runningDifference with Date32 type (#42143) 2022-10-18 14:33:31 +02:00
Nikolai Kochetov
c457f7dff3 Fix and more tests. 2022-10-18 12:21:16 +00:00
Vladimir C
a298a5238b
Merge pull request #42217 from ClickHouse/vdimir/style-check-code-used-in-comment 2022-10-18 13:26:39 +02:00
Roman Vasin
d9fcd91875 Add toStableRelativeHourNum 2022-10-18 09:07:12 +00:00
Nikolai Kochetov
3d1ed2969a Fix possible LOGICAL_ERROR in binary ariphmetics monotonicity. Fix invalid evaluation of binary monotonic function in KeyCondition. 2022-10-17 18:21:03 +00:00
Yakov Olkhovskiy
3ce1fa09d6
Merge pull request #41198 from ClickHouse/composable-protocol
Composable protocol
2022-10-17 11:23:12 -04:00
Alexey Milovidov
d1f0c80ffe Revert "Merge pull request #40217 from zvonand/zvonand-minmax"
This reverts commit df934d8762, reversing
changes made to d3a7945b1b.
2022-10-17 04:57:15 +02:00
Vitaly Baranov
91c438eebe
Merge pull request #42263 from vitlibar/refactor-udf
Refactor the implementation of user-defined functions
2022-10-15 12:33:10 +02:00
Kruglov Pavel
7980920bd7
Merge branch 'master' into fix-format-row 2022-10-14 20:49:21 +02:00
Kruglov Pavel
ff11904850
Merge branch 'master' into improve-combinators 2022-10-14 17:19:31 +02:00
Nikolay Degterinsky
c11e4bfbbf Fix build 2022-10-14 15:13:26 +00:00
vdimir
ad255206f4
Exclude comments from style-check defined extern 2022-10-14 11:42:18 +00:00
Roman Vasin
040d61e047 Use {} in error message formatting 2022-10-14 08:13:04 +00:00
Nikolay Degterinsky
cf6471c6b9 Fix style 2022-10-14 02:48:04 +00:00
Nikolay Degterinsky
af1d306b12 Add Interval arithmetics 2022-10-14 02:16:12 +00:00
Roman Vasin
14ba9fa51d Fix Date32 argument in dispatchConstForSecondColumn 2022-10-13 13:35:14 +00:00
Roman Vasin
4cf2913054 Fix message about allowed argument types 2022-10-13 12:58:22 +00:00
sperlingxx
a901faeb84 Fix add/minus Date Interval over Date32 type
Signed-off-by: sperlingxx <lovedreamf@gmail.com>
2022-10-13 18:00:54 +08:00
Vitaly Baranov
2e59d671fc Split UserDefinedSQLObjectsLoader to interface and implementation. 2022-10-13 10:32:32 +02:00
Roman Vasin
590ed7b640 Add transforms for other arguments lke year, quarter etc 2022-10-12 15:16:09 +00:00
AlfVII
5b2703c412
Merge branch 'master' into fix-slow-json-extract-with-low-cardinality 2022-10-11 13:28:07 +02:00
Yakov Olkhovskiy
b5808a3f00
Merge branch 'master' into composable-protocol 2022-10-10 08:07:48 -04:00
Maksim Kita
2f5b2d782c
Merge pull request #42063 from kitaisreal/function-name-normalization-header-functions
Function name normalization fix functions header
2022-10-09 14:19:33 +03:00
Yakov Olkhovskiy
6c8e52eb67
Merge branch 'master' into composable-protocol 2022-10-08 20:33:32 -04:00
Nikolay Degterinsky
68abf43767 Better INTERVAL parsing and execution 2022-10-09 00:00:14 +00:00
Alexander Tokmakov
4175f8cde6 abort instead of __builtin_unreachable in debug builds 2022-10-07 21:49:08 +02:00
Vitaly Baranov
26b2db2c94
Merge pull request #42073 from BoloniniD/BLAKE3_fixes
Minor fixes for BLAKE3
2022-10-07 15:00:13 +02:00
Yakov Olkhovskiy
2229087896
Merge branch 'master' into composable-protocol 2022-10-07 02:23:26 -04:00
BoloniniD
d188601881 Fix style 2022-10-06 21:41:26 +03:00
Maksim Kita
6ad435d034
Merge branch 'master' into function-name-normalization-header-functions 2022-10-06 13:29:21 +03:00
Robert Schulze
da5a2e2db0
Merge remote-tracking branch 'origin/master' into generated-file-cleanup
Physical merge conflicts:
- src/Common/ZooKeeper/ZooKeeperImpl.cpp
- src/Core/config_core.h.in
- src/Functions/FunctionsAES.h
- src/Functions/config_functions.h.in
- src/configure_config.cmake

Logical merge conflicts:
- Functions/tryDecrypt.cpp
2022-10-06 08:43:25 +00:00
BoloniniD
87f06bbe0b Fix [[noreturn]] function variant 2022-10-05 23:38:44 +03:00
Roman Vasin
4ab9c15048 Add ToExtendedRelativeDayNumImpl 2022-10-05 14:19:32 +00:00
Roman Vasin
eb37b0f5b9 Merge branch 'master' of github.com:ClickHouse/ClickHouse into date_diff 2022-10-05 13:15:06 +00:00
Nikolay Degterinsky
980600dc2f
Merge pull request #41206 from canhld94/ch_canh_fix_decrypt_with_null
Add function tryDecrypt that returns NULL when decrypt fail
2022-10-05 09:13:36 +02:00
BoloniniD
9dd15998c7 Print nicer exception if BLAKE3 is unavailable 2022-10-05 00:11:41 +03:00
flynn
a4fdfb6586 fix 2022-10-04 16:32:31 +00:00
flynn
7abb251b97 filesystemAvailable and related functions support one optional argument with disk name 2022-10-04 15:29:53 +00:00
Maksim Kita
f4101861e7 Function name normalization fix functions header 2022-10-04 17:29:33 +02:00
Robert Schulze
8864f135c4
Merge branch 'master' into fix-todatetime64 2022-10-04 14:11:45 +02:00
Duc Canh Le
cd968ce43d fix register function 2022-10-04 14:56:46 +08:00
Duc Canh Le
a886804cbf Merge branch 'master' into ch_canh_fix_decrypt_with_null 2022-10-04 13:20:29 +08:00
Robert Schulze
385be7f528
Fix tests 2022-10-03 18:05:16 +00:00
Sergei Trifonov
a592150ae7
Merge branch 'master' into fix-slow-json-extract-with-low-cardinality 2022-10-03 18:10:07 +02:00
Robert Schulze
ff2cbff4a1
Check boundaries similar to integer handling 2022-10-03 15:50:26 +00:00
Robert Schulze
123afbca80
Fix toDateTime64() for negative floats
Resolves #41686
2022-10-03 13:33:12 +00:00
Vitaly Baranov
65c61877c7
Merge pull request #33435 from BoloniniD/BLAKE3
Integrating Rust code into ClickHouse
2022-10-03 15:25:06 +02:00
Anton Popov
6e61cf92f5 Merge remote-tracking branch 'upstream/master' into HEAD 2022-10-03 13:16:57 +00:00
Roman Vasin
dab5e80c81 Add support of Date32 arguments 2022-10-03 13:15:32 +00:00
Duc Canh Le
528591245f Fix register name 2022-10-03 18:46:20 +08:00
Duc Canh Le
acfc0cf0ab add doc for tryDecrypt 2022-10-03 18:06:54 +08:00
Duc Canh Le
fbb9b3f5ab Merge branch 'master' into ch_canh_fix_decrypt_with_null 2022-10-03 17:56:06 +08:00
AlfVII
8fc073d3f9
Merge branch 'master' into fix-slow-json-extract-with-low-cardinality 2022-10-03 10:00:35 +02:00
Alfonso Martinez
926210b1dd Merge branch 'fix-slow-json-extract-with-low-cardinality' of github.com:AlfVII/ClickHouse into fix-slow-json-extract-with-low-cardinality 2022-10-03 10:00:08 +02:00
Alfonso Martinez
b1fced367e Fixed warning 2022-10-03 09:59:52 +02:00
Robert Schulze
db5ef7b3cb
Merge branch 'master' into generated-file-cleanup 2022-10-02 23:13:18 +02:00
Robert Schulze
d726ca3212
Refactoring: Un-inline some error handling methods 2022-10-02 19:52:40 +00:00
Robert Schulze
8e727d4fbc
Merge pull request #41910 from arenadata/ADQM-583
Improve enable_extended_results_for_datetime_functions option to return results of type DateTime64
2022-10-02 20:46:51 +02:00
BoloniniD
3a3ca51980 Fixes after review 2022-10-02 20:52:05 +03:00
Alexey Milovidov
0d1d177013
Merge pull request #41131 from JackyWoo/add_function_java_int_hash
Support Java integers hashing in `javaHash`
2022-10-02 18:10:51 +03:00
Duc Canh Le
99bf356220
Merge branch 'master' into ch_canh_fix_decrypt_with_null 2022-10-02 14:35:42 +08:00
AlfVII
461141bcc4
Merge branch 'master' into fix-slow-json-extract-with-low-cardinality 2022-10-01 11:35:49 +02:00
BoloniniD
fe7b2fdf6e
Merge branch 'master' into BLAKE3 2022-09-30 18:51:31 +03:00
Anton Popov
9916e35b3f
Merge pull request #41701 from CurtizJ/fix-monotonic-order-by
Fix `ORDER BY` monotonic functions
2022-09-30 17:32:37 +02:00
Alfonso Martinez
875145a813 FIxed corner case in lowCardinalityFixedString and FixedString 2022-09-30 12:41:41 +02:00
Robert Schulze
cc92a2d174
Merge branch 'master' into generated-file-cleanup 2022-09-30 09:56:31 +02:00
Roman Vasin
f716fc2fe5 Put list of functions in correct order in docs; Use new formatting in exception messages. 2022-09-30 07:54:35 +00:00
BoloniniD
55c79230b3 Merge branch 'master' of github.com:ClickHouse/ClickHouse into BLAKE3 2022-09-29 23:53:25 +03:00
Roman Vasin
45414b251d Merge branch 'master' of github.com:ClickHouse/ClickHouse into ADQM-583 2022-09-29 17:02:49 +00:00
Maksim Kita
f5a8acaa4a
Merge pull request #41870 from jiebinn/compare_with_empty_string
FunctionsComparison: optimize the string_vector_constant when empty string constant
2022-09-29 19:30:02 +03:00
Roman Vasin
c6fda60f32 Cleanup code 2022-09-29 15:45:49 +00:00
Roman Vasin
02e08fa301 Use another approach for timeSlot() 2022-09-29 15:44:56 +00:00
Roman Vasin
e0099d52de Use C++20 format() syntax for exceptions 2022-09-29 14:07:02 +00:00
JackyWoo
c70d687cfb fix build error 2022-09-29 19:56:50 +08:00
Roman Vasin
53b34c7e0a Put enable_extended_results_for_datetime_functions into private; correct if/else braces 2022-09-29 11:04:13 +00:00
Roman Vasin
22ccce6946 Remove WithContext; Rename execute_extended_result to executeExtendedResult 2022-09-29 09:29:07 +00:00
JackyWoo
5683676b72 throw exception for unsigned types 2022-09-29 15:50:03 +08:00
Alexey Milovidov
3170e5c4b9
Update FunctionsHashing.h 2022-09-28 21:11:32 +03:00
Roman Vasin
e66e70870a Fix timezone issues 2022-09-28 16:05:59 +00:00
Jiebin Sun
2288970d3e FunctionsComparison: optimize the comparison with empty string
Add the fast path in string_vector_constant if the string constant
is empty string. If the string size a_size and the string constant
size b_size are both 0, they are equal and both empty string. And
there is no need to call memequalSmallAllowOverflow15() for string
comparison.

We have tested the patch on ICX 8380 x 2 server with ClickBench.

Query 5, 10, 12, 13, 14, 15, 18, 20, 21, 22, 24, 25, 26, 27, 29, 34
of Clickbench have gained 2%-6% improvement. The overall geomean has
gained 1% improvement.
2022-09-28 23:48:34 +08:00
Robert Schulze
f24fab7747
Fix some #include atrocities 2022-09-28 13:49:28 +00:00
Robert Schulze
fd86829824
Consolidate config_core.h into config.h
Less duplication, less confusion ...
2022-09-28 13:31:57 +00:00
Robert Schulze
0753fd1c77
Consolidate config_functions.h into config.h
Less duplication, less confusion ...
2022-09-28 12:48:26 +00:00