Commit Graph

6678 Commits

Author SHA1 Message Date
Raúl Marín
f17d58cced Add comment 2024-02-15 20:53:22 +01:00
Nikolai Kochetov
ef7e8e0c5d Fixing style. 2024-02-15 17:35:44 +00:00
Nikolai Kochetov
365530c463 Fix 01656_test_query_log_factories_info with analyzer. 2024-02-15 17:12:22 +00:00
Raúl Marín
91f54f44b6 Fix several logical errors in arrayFold 2024-02-15 13:21:39 +01:00
Robert Schulze
ddaef8d342
Merge pull request #59752 from rschu1ze/countMatches-fuzzed
Fix AST fuzzer issue in function `countMatches`
2024-02-15 10:02:48 +01:00
Alexey Milovidov
0b58f16938
Merge pull request #59964 from ClickHouse/cleanups
Cleanups
2024-02-15 02:59:54 +01:00
jsc0218
0f6564627b correctly use maskedExecute 2024-02-14 17:20:13 +00:00
Nikolai Kochetov
70d456dc28
Update greater.cpp 2024-02-14 17:44:06 +01:00
Nikolai Kochetov
078ec9a97f
Update notEquals.cpp 2024-02-14 17:43:49 +01:00
yariks5s
c1897e74a8 fix 2024-02-14 14:04:25 +00:00
Yarik Briukhovetskyi
41304c3e11
Update src/Functions/FunctionBinaryArithmetic.h
Co-authored-by: Kruglov Pavel <48961922+Avogar@users.noreply.github.com>
2024-02-14 14:08:20 +01:00
Nikolai Kochetov
32a23244c9 Remove context from comparison functions.
(cherry picked from commit 57608cc6f9)
2024-02-14 12:38:13 +00:00
Yarik Briukhovetskyi
941e179be2
Merge branch 'ClickHouse:master' into div_int_with_decimal 2024-02-14 13:16:13 +01:00
李扬
90d07ba82c
Trivial optimize of function coalesce. (#59627)
* reuse result of functionfactory::get

* add perf test

* Update src/Functions/coalesce.cpp

Co-authored-by: János Benjamin Antal <antaljanosbenjamin@users.noreply.github.com>

* change as requested

---------

Co-authored-by: János Benjamin Antal <antaljanosbenjamin@users.noreply.github.com>
2024-02-14 11:29:45 +01:00
Robert Schulze
25667d9c9a
Attempt II at fixing the Fuzzer issue 2024-02-14 08:49:14 +00:00
Alexey Milovidov
2b4949bd18 Cleanups 2024-02-14 00:21:13 +01:00
yariks5s
ac601a0cb9 fix build 2024-02-13 23:12:21 +00:00
jsc0218
84e8755aae rename a setting 2024-02-13 19:27:29 +00:00
yariks5s
4125070791 Merge branch 'div_int_with_decimal' of https://github.com/yariks5s/ClickHouse into div_int_with_decimal 2024-02-13 18:38:36 +00:00
yariks5s
ed5591e68c changes due to review 2024-02-13 18:20:57 +00:00
jsc0218
c2b2a7f903
Merge branch 'ClickHouse:master' into DictShortCircuit 2024-02-12 12:48:08 -05:00
Robert Schulze
b1099e181d
Add check for NULL pattern argument 2024-02-11 11:38:33 +00:00
Robert Schulze
a6337fb6b0
Incorporate review feedback 2024-02-10 13:42:14 +00:00
Robert Schulze
4e2d0e8bf6
Merge remote-tracking branch 'rschu1ze/master' into countMatches-fuzzed 2024-02-10 13:22:30 +00:00
Alexey Milovidov
a7c30098b6 Merge branch 'master' of github.com:ClickHouse/ClickHouse into enable-coverage-for-debug-build 2024-02-09 22:52:49 +01:00
Alexey Milovidov
a6fcd63159
Merge pull request #58866 from rschu1ze/distance-with-cpu-dispatch
AVX vectorization of distance functions
2024-02-09 03:32:26 +01:00
Alexey Milovidov
cd0acc512d Merge branch 'master' of github.com:ClickHouse/ClickHouse into enable-coverage-for-debug-build 2024-02-08 22:08:15 +01:00
Robert Schulze
ccafc523a9
Fix style 2024-02-08 15:51:27 +00:00
Raúl Marín
5b16d6b958
Merge pull request #59754 from ClickHouse/revert-59683-rename-setting
Revert "Rename a setting"
2024-02-08 13:19:48 +01:00
Raúl Marín
697f7b28a7
Merge pull request #59739 from Algunenano/padstring_fix
Fix leftPad / rightPad function with FixedString input
2024-02-08 13:15:26 +01:00
Raúl Marín
284ed191ab
Revert "Rename a setting" 2024-02-08 13:13:22 +01:00
Robert Schulze
fc003497bb
Fix bug 59749 2024-02-08 11:50:20 +00:00
Robert Schulze
f7bb000b51
Refactorings, pt. II: disallow FixedString patterns 2024-02-08 11:38:04 +00:00
Robert Schulze
cfa1a452e1
Refactorings, pt. I 2024-02-08 11:33:34 +00:00
jsc0218
71f0d82c90 merge short circuit logic into getColumn 2024-02-08 00:34:59 +00:00
Alexey Milovidov
02c0b4c67f Merge branch 'master' of github.com:ClickHouse/ClickHouse into enable-coverage-for-debug-build 2024-02-07 22:45:50 +01:00
Alexey Milovidov
393abebf64
Merge pull request #59683 from ClickHouse/rename-setting
Rename a setting
2024-02-07 22:43:14 +01:00
Raúl Marín
48a48be135 Fix leftPad / rightPad function with FixedString input 2024-02-07 22:31:21 +01:00
Robert Schulze
7edcb86c08
Merge pull request #58632 from ClibMouse/series_outlier
Added function `seriesOutliersTukey` for outlier detetion in series data
2024-02-07 13:08:53 +01:00
Alexey Milovidov
d65a56d967
Merge branch 'master' into enable-coverage-for-debug-build 2024-02-07 04:58:21 +01:00
Alexey Milovidov
5991ea4dc3 Rename the setting 2024-02-07 00:00:34 +01:00
Raúl Marín
25738c8313 Remove no longer needed specialization 2024-02-06 20:34:12 +01:00
Raúl Marín
0a4e73a98d Strict aliasing for Int8 2024-02-06 20:33:32 +01:00
Anton Popov
3b22c3849f
Merge pull request #59621 from bigo-sg/opt_if_not_null
Trivial optimize on ifNotNull with intel AVX2
2024-02-06 19:13:06 +01:00
taiyang-li
bc9c1bf345 improve ifnotnull 2024-02-06 11:48:13 +08:00
taiyang-li
2c882f012e opt isNotnull 2024-02-06 11:35:14 +08:00
Bhavna Jindal
c9954a7eb8 added check for NaN and infinite values 2024-02-05 09:23:11 -08:00
Raúl Marín
c4e1d09c66 Reserve enough memory for memcpySmallAllowReadWriteOverflow15 2024-02-05 17:33:14 +01:00
taiyang-li
b4972bf5fb revert files 2024-02-04 16:59:26 +08:00
jsc0218
db7e312c0c switch default filling values to make the logic easier 2024-02-04 02:16:35 +00:00
yariks5s
e79ddd54af fix tests 2024-02-03 00:56:37 +00:00
Bhavna Jindal
28e6e29004 Minor fixes 2024-02-02 07:46:36 -08:00
Bhavna Jindal
ce31fa912b removed unnecessary method overloading and fixed documentation 2024-02-01 09:24:12 -08:00
yariks5s
d5eec2d85b trying to fix (casting the result to int) 2024-02-01 16:27:57 +00:00
jsc0218
4ce770aebf Merge remote-tracking branch 'origin/master' into DictShortCircuit 2024-02-01 15:29:27 +00:00
taiyang-li
1d8de1d345 fix style 2024-02-01 19:39:22 +08:00
taiyang-li
d9820f9704 change as request 2024-02-01 11:13:26 +08:00
taiyang-li
ddc6aad8ff merge master 2024-02-01 10:58:33 +08:00
jsc0218
237776c4d4 remove unnecessary column expand and shared_ptr 2024-01-31 20:06:29 +00:00
Bhavna Jindal
6d24ffc976 Fix filename and spelling errors 2024-01-31 10:57:43 -08:00
Bhavna Jindal
4bc26fe45f Added support for custom percentiles and K 2024-01-31 10:41:05 -08:00
Bhavna Jindal
487ef67e97 Added custom tukey 2024-01-31 10:39:58 -08:00
Bhavna Jindal
90dfacd5a6 added a fix for failing testcase 2024-01-31 10:39:58 -08:00
Bhavna Jindal
f4c14e15a2 added a fix for failing testcase 2024-01-31 10:39:58 -08:00
Bhavna Jindal
d2ce39387f implemented series_outlier method 2024-01-31 10:39:39 -08:00
Kruglov Pavel
325419b096
Merge pull request #59398 from Avogar/variant-type-func
Add function variantType
2024-01-31 13:06:54 +01:00
Raúl Marín
f67bff12b7
Merge pull request #59148 from bigo-sg/improve_if_with_floating
Continue optimizing branch miss of if function when result type is float*/decimal*/int*
2024-01-31 12:42:06 +01:00
taiyang-li
dc7b9d8208 fix conflicts 2024-01-31 17:37:37 +08:00
taiyang-li
2ad7607bad opt if when input type is map 2024-01-31 17:33:47 +08:00
taiyang-li
818fb9802a change as request 2024-01-31 11:48:02 +08:00
jsc0218
8583192948 refactior short circuit setting 2024-01-30 21:26:43 +00:00
Kruglov Pavel
bd3bb05308
Fix 2024-01-30 20:32:59 +01:00
Kruglov Pavel
46432da743
Remove unneded file 2024-01-30 20:30:17 +01:00
Kruglov Pavel
8c69a6e28d
Fix build 2024-01-30 20:28:56 +01:00
avogar
584694ed51 Add function variantType 2024-01-30 18:01:12 +00:00
yariks5s
0576aa2b7f fix fuzzer 2024-01-30 16:45:36 +00:00
yariks5s
0557cdb8a9 fix due to review 2024-01-30 15:31:04 +00:00
Raúl Marín
b3483eede3 Fix translate() return type 2024-01-30 13:41:04 +01:00
Alexey Milovidov
b7a8933b2c
Merge pull request #59319 from bigo-sg/improve_regexp_extract
Improve exception message of function regexp_extract
2024-01-30 08:13:14 +01:00
Alexey Milovidov
b4a5b6060e
Merge pull request #59341 from rschu1ze/non-string-concat-with-separator
Allow non-string arguments in `concatWithSeparator()`
2024-01-30 04:10:06 +01:00
Alexey Milovidov
eb54432cbe Merge branch 'master' of github.com:ClickHouse/ClickHouse into enable-coverage-for-debug-build 2024-01-30 03:53:11 +01:00
taiyang-li
815c73f1e5 change as request 2024-01-30 10:41:42 +08:00
Robert Schulze
7683b44bf6
Merge pull request #58961 from ClibMouse/seriesDecompose
Return baseline component from function `seriesDecomposeSTL()`
2024-01-29 20:41:09 +01:00
Robert Schulze
8ddda0caf0
Merge pull request #59229 from rschu1ze/cleanup-msan-usage
Minor cleanup of msan usage
2024-01-29 20:39:06 +01:00
yariks5s
1ab29bef62 fixes 2024-01-29 15:33:09 +00:00
Alexey Milovidov
cb69a1b25d Merge branch 'master' of github.com:ClickHouse/ClickHouse into enable-coverage-for-debug-build 2024-01-29 15:35:04 +01:00
Robert Schulze
c2b7d2047e
Support arguments of arbitary type in function concatWithSeparator()
Follow-up to #56540
2024-01-29 14:11:21 +00:00
Robert Schulze
1aae7d7d95
Cosmetics: Rename variable 2024-01-29 13:35:19 +00:00
Robert Schulze
2191569d6b
Cosmetics: remove superfluous inline 2024-01-29 13:24:43 +00:00
taiyang-li
7aea3847db improve exception message of function regexp_extract 2024-01-29 11:54:19 +08:00
taiyang-li
49fc8a7099 Merge branch 'master' into improve_if_with_floating 2024-01-29 11:02:05 +08:00
Alexey Milovidov
4a94ae5a1b Merge branch 'master' into enable-coverage-for-debug-build 2024-01-28 22:24:26 +01:00
avogar
5833641fa5 Merge branch 'master' of github.com:ClickHouse/ClickHouse into variant-data-type 2024-01-26 16:54:02 +00:00
avogar
7908f69d84 Fix special builds and tests 2024-01-26 14:01:06 +00:00
Yarik Briukhovetskyi
0cbadc9b52
Merge pull request #59190 from yariks5s/fix_to_string_nullable_timezone
Fix crash with nullable timezone for `toString`
2024-01-26 13:33:12 +01:00
taiyang-li
56db02c953 Merge branch 'master' into improve_if_with_floating 2024-01-26 19:21:49 +08:00
taiyang-li
29b3cf60a6 fix perf regression 2024-01-26 16:45:09 +08:00
taiyang-li
626e30609a change as request 2024-01-26 10:43:27 +08:00
Alexey Milovidov
aedffeaab0
Merge pull request #58959 from Algunenano/fix_sum_map
Fix sumMapFiltered with NaN values
2024-01-25 23:50:28 +01:00
yariks5s
36055bd008 init 2024-01-25 21:44:46 +00:00
avogar
ff15ab12b8 Remove bad implementation of DataTypeVariant::createColumnConst, support use_variant_as_common_type setting in functions array/map 2024-01-25 21:06:50 +00:00
Nikita Taranov
368ef60c77
Merge pull request #59093 from ClickHouse/nickitat-patch-18
Add `[[nodiscard]]` to a couple of methods
2024-01-25 17:03:05 +01:00
Robert Schulze
16a9e95605
Minor cleanup of msan usage 2024-01-25 15:40:11 +00:00
Yarik Briukhovetskyi
da1cf46b14
Fix fuzzer 2024-01-25 15:47:32 +01:00
avogar
4b26de9660 Rename setting to use it not only in if/multiIf in future 2024-01-25 13:26:13 +00:00
taiyang-li
aca8e90ec9 optimize when if condition is constant 2024-01-25 20:09:26 +08:00
yariks5s
c277148ee1 enhanced tests, fix 2024-01-25 12:01:51 +00:00
Maksim Kita
2a327107b6 Updated implementation 2024-01-25 14:31:49 +03:00
taiyang-li
e8629cf4f5 add another perf and tests 2024-01-25 18:02:55 +08:00
jsc0218
311276252e Merge remote-tracking branch 'origin/master' into DictShortCircuit 2024-01-24 19:29:56 +00:00
yariks5s
4deb1eab19 init 2024-01-24 18:17:19 +00:00
Bhavna Jindal
926982856d Merge remote-tracking branch 'upstream/master' into seriesDecompose 2024-01-24 10:11:00 -08:00
taiyang-li
2418798e3c fix code style 2024-01-24 20:02:07 +08:00
taiyang-li
4e337f8317 add perf tests 2024-01-24 20:00:26 +08:00
taiyang-li
eae7878609 fix style 2024-01-24 19:53:50 +08:00
taiyang-li
393cab820e add some comment 2024-01-24 18:48:29 +08:00
taiyang-li
622a0f65b3 optimize for float 2024-01-24 18:46:06 +08:00
taiyang-li
aed8ffe3d8 optimize for decimal 2024-01-24 16:30:37 +08:00
Nikita Taranov
c7be7363cf fix 2024-01-23 14:46:33 +01:00
Bhavna Jindal
084ee74b68 minor fix 2024-01-22 13:32:57 -08:00
Bhavna Jindal
d9edd5a7f3 fix spell check 2024-01-22 13:32:57 -08:00
Bhavna Jindal
f935493f28 fix trailing whitespaces 2024-01-22 13:32:57 -08:00
Bhavna Jindal
c59f3e164f Return baseline component as fourth array 2024-01-22 13:32:57 -08:00
Raúl Marín
f5ffe4e473 Try getting a better error 2024-01-22 18:58:06 +01:00
Nikolai Kochetov
6dfedc5f06 Fix columns size for flat dictionary. Add check. 2024-01-22 14:31:44 +00:00
avogar
b4dcd6755a Use ColumnConst instead of Field in IColumn::createWithOffsets 2024-01-22 13:41:58 +00:00
Robert Schulze
68fc97089e
Revert "(Futile) unrolling attempt at vectorization"
This reverts commit df30a990545eafdf5e6a09034d81a97fb0188ba0.
2024-01-22 10:25:10 +00:00
Robert Schulze
68d0f4e421
(Futile) unrolling attempt at vectorization 2024-01-22 10:25:10 +00:00
Robert Schulze
d2c671c17e
1st attempt at vectorization
80 mio arrays with 150 elements each, runtimes in sec

WITH
    (SELECT vec FROM vectors limit 1) AS const_vec
SELECT sum(dist)
FROM
    (SELECT <distance>(const_vec, vec) AS dist FROM vectors)

                        auto-vectorized         hand-vectorized
L2      Float32         0.61                    0.57
L2      Float64         1.15                    0.99
cos     Float32         0.78                    0.65
cos     Float64         1.35                    1.05
2024-01-22 10:25:09 +00:00
Alexey Milovidov
eb4f61ba31
Update visibleWidth.cpp 2024-01-21 17:50:21 +03:00
Alexey Milovidov
735708e9bb Merge branch 'master' into enable-coverage-for-debug-build 2024-01-20 21:40:53 +01:00
Alexey Milovidov
a8022ed624 Better behavior of visibleWidth 2024-01-20 11:22:23 +01:00
Kruglov Pavel
20379d34d5
Merge branch 'master' into variant-data-type 2024-01-19 23:17:42 +01:00
Alexey Milovidov
0c1e92aea5 Less threads in clickhouse-local 2024-01-19 04:53:14 +01:00
Alexey Milovidov
7c0b167e2d Merge branch 'master' of github.com:ClickHouse/ClickHouse into enable-coverage-for-debug-build 2024-01-19 03:59:27 +01:00
Kruglov Pavel
5444cde408
Merge branch 'master' into variant-data-type 2024-01-18 18:31:27 +01:00
Dmitry Novik
ba2dad98bb
Merge pull request #58913 from ClickHouse/fix-style
Style fix
2024-01-18 14:24:39 +01:00
Alexey Milovidov
c098f41dbc Merge branch 'master' into enable-coverage-for-debug-build 2024-01-17 22:35:51 +01:00
Robert Schulze
226f1804b7
Fix spelling and style 2024-01-17 15:26:18 +00:00
Dmitry Novik
3a1c3638e8 Style fix 2024-01-17 15:04:50 +00:00
Robert Schulze
84ab20ff77
Some fixups 2024-01-17 12:01:52 +00:00
Robert Schulze
22534c69c4
Merge remote-tracking branch 'ClickHouse/master' into u/zhengmiao/AddArrayFunctionShingles 2024-01-17 10:49:11 +00:00
vdimir
8b108365f5
Merge pull request #58808 from ClickHouse/vdimir/json_extract_lc_fix
Fix JSONExtract function for LowCardinality(Nullable) columns
2024-01-16 11:01:10 +01:00
Alexey Milovidov
779f738cb9 Merge branch 'master' of github.com:ClickHouse/ClickHouse into enable-coverage-for-debug-build 2024-01-16 05:07:17 +01:00
jsc0218
0d46bfe66a Merge remote-tracking branch 'origin/master' into DictShortCircuit 2024-01-15 14:52:49 +00:00
Azat Khuzhin
48a700edba Support query parameters in ALTER TABLE ... PART
But, to make this happen it is not enough to simply fix the parser, the
whole ASTs for ALTER should be fixed as well, since they store `ASTPtr`
instead of `IAST *`, and so because of `ReplaceQueryParameterVisitor`
does not work for ALTER query.

So this patch converts ASTPtr to `IAST *` for ASTAlterQuery and
ASTAlterCommand (plus it also fixes when the children for
ASTAlterCommand had not been updated sometimes).

And only after this it is possible to adjust the parser (see
places with `parser_string_and_substituion` in the parser code).

v2: also fix ASTAlterCommand::clone (add missing components) and ParserAlterCommand::parseImpl
v3: fix APPLY DELETED MASK
v4: fix mutations_execute_nondeterministic_on_initiator/mutations_execute_subqueries_on_initiator
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-15 14:16:54 +03:00
vdimir
2970812cb1
Fix JSONExtract function for LowCardinality(Nullable) columns 2024-01-15 10:38:56 +00:00
Alexey Milovidov
3e09feda33 More functions 2024-01-15 00:36:07 +01:00
Alexey Milovidov
33d9a1d4e8 Documentation 2024-01-14 22:03:47 +01:00
Alexey Milovidov
d112492c56 Remove some code 2024-01-13 03:48:04 +01:00