Commit Graph

4550 Commits

Author SHA1 Message Date
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