Commit Graph

6526 Commits

Author SHA1 Message Date
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
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
Ilya Yatsishin
2c86b7ae6a
Merge pull request #58557 from yariks5s/to_start_of_interval_bug_fix
toStartOfInterval for milli- microsencods values rounding
2024-01-12 20:39:27 +04:00
avogar
9e639df12e Add fixes, add new mode to getLeastSupertype and use it in if/multiIf 2024-01-11 18:44:05 +00:00
Robert Schulze
52d75ab68f
Merge pull request #58458 from rschu1ze/replace-std_regexp-by-re2
Replace `std::regex` by re2
2024-01-10 17:46:54 +01:00
Robert Schulze
a0128e0f51
Merge pull request #58544 from rschu1ze/sqid-decode
Add `sqidDecode()` function
2024-01-10 13:47:13 +01:00
Robert Schulze
499227b9cf
Merge remote-tracking branch 'rschu1ze/master' into replace-std_regexp-by-re2 2024-01-10 10:02:53 +00:00
taiyang-li
231de4ac49 Merge branch 'master' into ch_opt_array_element 2024-01-10 15:49:43 +08:00
Nikolay Degterinsky
24733700fb
Merge pull request #57745 from KevinyhZou/imporve_multi_if_nullable
Improve `MultiIf` function performance while type is nullable
2024-01-09 23:17:58 +01:00
Robert Schulze
4db26ad56b
Merge pull request #58531 from rschu1ze/string-similarity
Implement Damerau-Levenshtein distance and Jaro[-Winkler] string distance functions
2024-01-09 22:46:57 +01:00
Robert Schulze
69ba1a706a
Merge remote-tracking branch 'rschu1ze/master' into string-similarity 2024-01-09 15:22:52 +00:00
Robert Schulze
db3b430d41
Stylistic changes 2024-01-09 12:53:17 +00:00
Kruglov Pavel
22a0e085b7
Merge pull request #58597 from rschu1ze/makedatetime64-nonconst-fraction
`makeDateTime64()`: Allow non-const fraction argument
2024-01-09 12:17:12 +01:00
Robert Schulze
64ab30f446
Merge pull request #57078 from ClibMouse/seriesDecompose
Seasonal decompose of time series into seasonal, trend and residue components
2024-01-09 11:18:13 +01:00
Raúl Marín
803d8d6320
Merge pull request #58594 from Algunenano/missing_includes
Add some missing LLVM includes
2024-01-09 11:01:44 +01:00
taiyang-li
e5b4bc8f45 Merge branch 'master' into ch_opt_array_element 2024-01-09 17:17:38 +08:00
Bhavna Jindal
b2434d0c10 minor refactoring and cosmetic changes 2024-01-08 10:49:09 -08:00
Robert Schulze
08e687c847
Incorporate review feedback 2024-01-08 15:55:27 +00:00
Kruglov Pavel
b947609b8e
Merge branch 'master' into variant-data-type 2024-01-08 15:04:51 +01:00
Robert Schulze
f3c77c046a
makeDateTime64(): Allow non-const fraction argument 2024-01-08 11:58:32 +00:00
Raúl Marín
c1b95560db Add some missing LLVM includes 2024-01-08 11:25:57 +01:00
kevinyhzou
a293ade11b modify code 2024-01-08 14:43:29 +08:00
taiyang-li
9f8ff87bf8 change as request 2024-01-08 11:19:38 +08:00
taiyang-li
5c0ea7db94 Merge branch 'master' into ch_opt_array_element 2024-01-08 10:41:20 +08:00
Robert Schulze
f553b55e3a
Merge remote-tracking branch 'rschu1ze/master' into regex-std-re2 2024-01-07 22:31:35 +00:00
Robert Schulze
8e804487f3
Some fixups 2024-01-07 22:28:08 +00:00
Robert Schulze
5f105a56af
Fix style 2024-01-07 08:34:41 +00:00
Robert Schulze
ee0738e3df
Implement jaroSimilarity + jaroWinklerSimilarity 2024-01-07 08:34:41 +00:00
Robert Schulze
7d98fdede7
Implement Dramerau-Levenshtein distance 2024-01-07 08:34:41 +00:00
Robert Schulze
43896784a6
Cosmetics 2024-01-07 08:34:41 +00:00
Robert Schulze
dd2d9ff168
Minor fixes 2024-01-07 08:25:19 +00:00
Robert Schulze
d54e500832
Merge remote-tracking branch 'rschu1ze/master' into punycode-revert-revert 2024-01-07 08:08:46 +00:00
Robert Schulze
adebc372d7
Improve wording in docs 2024-01-07 08:07:03 +00:00
Robert Schulze
394ade4080
Update submodule 2024-01-05 22:01:35 +00:00
Robert Schulze
44b9547fba
Rename decode/encodeSqid() to sqidDecode/Encode() 2024-01-05 21:40:35 +00:00
Bhavna Jindal
22474f6b38 changed 2nd argument type to UInt and other cosmetic changes 2024-01-05 11:39:52 -08:00
Yarik Briukhovetskyi
cd00481e46
review fix 2024-01-05 19:02:14 +01:00
Yarik Briukhovetskyi
94533ecb9f
Update DateTimeTransforms.h 2024-01-05 17:59:21 +01:00
Yarik Briukhovetskyi
90a986e262
Update DateTimeTransforms.h 2024-01-05 17:58:22 +01:00
yariks5s
12585ded09 init 2024-01-05 16:51:35 +00:00
Robert Schulze
f6ecf2b617
Add decode function for sqids 2024-01-05 13:33:40 +00:00
Robert Schulze
8169b3e17f
Merge remote-tracking branch 'rschu1ze/master' into punycode-revert-revert 2024-01-05 12:19:46 +00:00
Robert Schulze
2cc2a9089c
Incorporate review feedback 2024-01-05 12:18:21 +00:00
Robert Schulze
76b7cddb18
Update docs 2024-01-04 16:29:43 +00:00
Robert Schulze
98d602c3d5
Reserve enough space in result column upfront 2024-01-04 16:21:08 +00:00
Robert Schulze
03e344c36a
Fix preprocessor guard 2024-01-04 16:15:51 +00:00
Robert Schulze
296e1ac8aa
FunctionSqid.cpp --> sqid.cpp 2024-01-04 16:11:39 +00:00
Bhavna Jindal
c2ebb9a5d9 fix for const column input 2024-01-03 13:05:52 -08:00
Robert Schulze
f652c6050c
Implement idnaEn/Decode() 2024-01-03 18:08:32 +00:00
Bhavna Jindal
62521d30ce fix style-check 2024-01-03 09:34:58 -08:00
Bhavna Jindal
8a7eaed07e Added additional testcases 2024-01-03 09:16:32 -08:00
Zheng Miao
49c244db01
Merge branch 'ClickHouse:master' into u/zhengmiao/AddArrayFunctionShingles 2024-01-04 00:59:33 +08:00
Blacksmith
46d3758444 Throw exception when second argument is not valid. 2024-01-04 00:45:06 +08:00
Kruglov Pavel
4d8cf71ba7
Merge branch 'master' into variant-data-type 2024-01-03 15:21:23 +01:00
Raúl Marín
ff90f64bc1 Merge remote-tracking branch 'blessed/master' into speedup_numbers 2024-01-03 13:33:22 +00:00
Robert Schulze
9a49f0cbb3
Factorize common code 2024-01-03 11:26:52 +00:00
Robert Schulze
b5d7ea2b02
Introduce OrNull() overloads for punycodeEncode/Decode() 2024-01-03 10:50:00 +00:00
Robert Schulze
45613f1d14
Refactor punycodeEncode/Decode() functions to inerit from IFunction directly 2024-01-03 09:18:25 +00:00
Robert Schulze
2186aa8f21
Revert "Revert "Implement punycode encoding/decoding""
This reverts commit 345d29a3c1.
2024-01-03 08:03:01 +00:00
Alexey Milovidov
029b1326e0
Merge pull request #58399 from ClickHouse/minor-fixes-lambda
Fix a comment; remove unused method; stop using pointers
2024-01-02 19:21:00 +01:00
Bhavna Jindal
c4ebc75209 remove stl-cpp submodule 2024-01-02 08:53:35 -08:00
Bhavna Jindal
d4eb8c7352 handled NaN and inf values 2024-01-02 08:52:28 -08:00
Bhavna Jindal
c0cff7b4f3 handled edge cases and addresses review comments 2024-01-02 08:52:28 -08:00
Bhavna Jindal
6d58c99408 fixed the failing fasttest and style-check 2024-01-02 08:52:28 -08:00
Bhavna Jindal
5c34ddab09 implemneted seriesDecomposeSTL method 2024-01-02 08:52:23 -08:00
Bhavna Jindal
a407cd270d Added new library stl-cpp for sesonal decompose of time series data 2024-01-02 08:48:10 -08:00
kevinyhzou
733e68cfd5 review fix 2024-01-02 17:47:45 +08:00
Alexey Milovidov
e4444e1db4 More minor changes 2024-01-01 19:17:04 +01:00
Alexey Milovidov
4172057a4e Fix a comment; remove unused method; stop using pointers 2024-01-01 18:46:38 +01:00
Alexey Milovidov
974cf132d4 Fix bad formatting of the timeDiff compatibility alias 2024-01-01 17:45:23 +01:00
Blacksmith
5c0d34341f Add array function shingles. 2024-01-01 22:32:27 +08:00
Alexey Milovidov
78523639e0 Remove function 2023-12-30 14:52:54 +01:00
Alexey Milovidov
ebd95586d2
Merge pull request #58358 from ClickHouse/format-constexpr
Make function `format` return a constant on constant arguments.
2023-12-30 12:34:56 +01:00
Alexey Milovidov
e1eca1ee39 Support for Enum in function transform 2023-12-29 21:48:38 +01:00
Alexey Milovidov
7c2d868ef1 Revert "Support for Enum in function transform"
This reverts commit 06628f76d7.
2023-12-29 21:48:14 +01:00
Alexey Milovidov
06628f76d7 Support for Enum in function transform 2023-12-29 21:47:53 +01:00
Alexey Milovidov
9d8c26331e Make format constexpr 2023-12-29 21:09:58 +01:00
Raúl Marín
ed6b9703a1 More iota 2023-12-29 17:20:18 +01:00
Raúl Marín
bda6104f84 Replace std::iota with DB::iota where possible 2023-12-29 14:38:22 +01:00
kevinyhzou
842252bcad review fix 2023-12-29 09:32:31 +08:00
kevinyhzou
41cdedbf26 review 2023-12-28 16:16:54 +08:00
Alexey Milovidov
345d29a3c1
Revert "Implement punycode encoding/decoding" 2023-12-28 09:12:22 +03:00
Azat Khuzhin
b9233f6d4f Move Allocator code into module part
This should reduce amount of code that should be recompiled on
Exception.h changes (and everything else that had been included there).

This will actually not help a lot, because it is also included into
PODArray.h and ThreadPool.h at least... Sigh.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-27 15:42:08 +01:00
Raúl Marín
e87b9751bd Cleanup some known short messages 2023-12-26 12:58:50 +01:00
Azat Khuzhin
3be3b0a280 Fix incorrect Exceptions
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-24 21:26:32 +01:00
Nikolay Degterinsky
a30980c930
Merge pull request #58139 from zvonand/zvonand-issue-53190
Fix `accurateCastOrNull` for out-of-range DateTime
2023-12-23 14:52:59 +01:00
avogar
f594ab34f5 Fix special build 2023-12-23 12:56:11 +00:00
Alexey Milovidov
468b5e2813 Fix use-after-move 2023-12-23 08:23:15 +01:00
Andrey Zvonov
01eb9be18e
Merge branch 'ClickHouse:master' into zvonand-issue-53190 2023-12-22 14:33:18 +01:00
zvonand
c1705bc0c7 fix accurateCastOrNull 2023-12-21 22:30:51 +01:00
Raúl Marín
58d94c0ce0 Fix clang-tidy 2023-12-21 17:48:57 +01:00
zhanglistar
f0a51e5be5 Modify comments and merge master. 2023-12-21 09:55:26 +08:00
zhanglistar
408f9ea1ae
Merge branch 'ClickHouse:master' into if-opt 2023-12-21 09:50:23 +08:00
Robert Schulze
ecb6f31211
Merge pull request #57969 from rschu1ze/punycode-is-cool
Implement punycode encoding/decoding
2023-12-20 10:20:34 +01:00
zhanglistar
810305fafe Fix if.xml. 2023-12-20 10:58:46 +08:00
Alexey Milovidov
319a7e2911
Merge pull request #57994 from Algunenano/blake3_llvm
Replace rust's BLAKE3 with llvm's implementation
2023-12-20 01:06:35 +01:00
avogar
319ae440b6 Implement Variant data type 2023-12-19 16:45:15 +00:00
Raúl Marín
3632688e55 Fix style 2023-12-19 11:48:15 +01:00
zhanglistar
59b049ce08 function if branch free fix tests. 2023-12-19 16:40:13 +08:00
Robert Schulze
1d9c0db1f6
Incorporate review feedback 2023-12-19 08:00:59 +00:00
Robert Schulze
00c407ecc1
Merge remote-tracking branch 'rschu1ze/master' into punycode-is-cool 2023-12-19 06:27:23 +00:00
zhanglistar
b252b7182c Function if performance improvment fix bug. 2023-12-19 12:09:00 +08:00
pufit
36d1905881
Merge pull request #57752 from chizhonkova/refactor_sql_udf_loader
Refactoring for UserDefinedSQLObjectsLoader
2023-12-18 16:08:46 -05:00
Alexey Milovidov
7178bd5c88
Merge pull request #57910 from Algunenano/log_message_string
Improvements for 00002_log_and_exception_messages_formatting
2023-12-18 21:02:23 +01:00
Raúl Marín
5601f97e0c Move FunctionsStringHashFixedString template to single file 2023-12-18 19:14:47 +01:00
Raúl Marín
80af5cb78a Always build the necessary LLVM modules if blake3 is enabled 2023-12-18 18:32:31 +01:00
Raúl Marín
99d1659b4c Replace rust's BLAKE3 with llvm's implementation 2023-12-18 15:29:01 +01:00
Robert Schulze
414a2893d0
Merge pull request #57821 from rschu1ze/consolidate-substring-tests
Dumb down `substring()` tests
2023-12-18 12:32:20 +01:00
Robert Schulze
29d70c12f6
Fix CI checks 2023-12-18 10:47:40 +00:00
Raúl Marín
2639d0715f Merge remote-tracking branch 'blessed/master' into log_message_string 2023-12-18 10:40:18 +01:00
zhanglistar
aaf6564711 if performance code format 2023-12-18 16:47:25 +08:00
zhanglistar
ba34b80087 If improvement add comment and performance test. 2023-12-18 16:43:45 +08:00
Alexey Milovidov
afd506984d
Merge pull request #57879 from rschu1ze/fix-arrayfold
Resurrect `arrayFold()`
2023-12-18 07:57:40 +01:00
kevinyhzou
3dc8f5ad52 improve multiIF 2023-12-18 12:02:40 +08:00
Alexey Milovidov
33cf8842bc
Merge branch 'master' into fix-arrayfold 2023-12-18 04:57:07 +01:00
Robert Schulze
af8b18707b
Fix style 2023-12-17 17:37:46 +00:00
Robert Schulze
19c8ac567f
Implement punycodeEncode()/Decode() 2023-12-17 17:04:28 +00:00
Robert Schulze
69007b5f71
Fix another bug 2023-12-17 11:16:05 +00:00
Alexey Milovidov
6ada95ea00 Remove C++ templates (normalizeQuery) 2023-12-17 02:44:30 +01:00
Raúl Marín
b269f87f4c Better text_log with ErrnoException 2023-12-15 19:27:56 +01:00
zhanglistar
028cd8955b function if trival opt. 2023-12-15 15:19:05 +08:00
Julia Kartseva
7a5b40563a
Merge pull request #57574 from ClibMouse/dev-seriesPeriodDetect
Revert "Revert "Implemented series period detect method using pocketfft lib""
2023-12-14 21:10:23 -08:00
Robert Schulze
eee4bacd71
Fix #57816, fix #57458. 2023-12-14 21:03:17 +00:00
Robert Schulze
f17d7e44f4
Refactorings: rename variables, decreases scopes, add comments 2023-12-14 20:48:18 +00:00
Bhavna Jindal
bb8589cabe minor cosmetic changes 2023-12-14 08:34:37 -08:00
kevinyhzou
380d9c996b consider constant 2023-12-14 22:54:43 +08:00
kevinyhzou
ca49bc0670 check style fix 2023-12-14 20:47:30 +08:00
kevinyhzou
37fb8a4dd9 remove unused code 2023-12-14 20:17:07 +08:00
kevinyhzou
d4a33bc0d1 review fix 2023-12-14 20:09:01 +08:00
kevinyhzou
21b86c0650 improve 2023-12-14 20:09:01 +08:00
kevinyhzou
e29b78d20b improve by use memcpy 2023-12-14 20:08:00 +08:00
kevinyhzou
46166c43bc some modify 2023-12-14 20:06:07 +08:00
kevinyhzou
14b8d8fb92 imporve multiif 2023-12-14 20:06:07 +08:00
Robert Schulze
b36a93a25d
Revert "Remove arrayFold"
This reverts commit 15dc0ed610.
2023-12-14 09:52:29 +00:00
Alexey Milovidov
15dc0ed610 Remove arrayFold 2023-12-14 04:34:32 +01:00
Robert Schulze
d0a4443bbc
Consolidate substring() tests 2023-12-13 16:49:39 +00:00
Robert Schulze
bbd7d0c057
Merge pull request #57277 from slvrtrn/substr-with-enums
Add Enums support to `substring` function
2023-12-13 17:03:03 +01:00
Bhavna Jindal
1190abae22 multiple rows fix 2023-12-12 10:55:15 -08:00
Natalya Chizhonkova
3d51192bad Refactoring for UserDefinedSQLObjectsLoader 2023-12-12 17:03:49 +03:00
Robert Schulze
e6372d5528
Merge remote-tracking branch 'rschu1ze/master' into substr-with-enums 2023-12-12 12:59:30 +00:00
robot-ch-test-poll1
b31b4c932f
Merge pull request #57746 from vitlibar/kill-query-sleep
sleep() function now can be cancelled with KILL QUERY
2023-12-12 13:21:40 +01:00
Robert Schulze
a4c306a85a
Merge pull request #57761 from rschu1ze/toStartOfInterval-refactoring
Minor refactoring of toStartOfInterval()
2023-12-12 09:49:50 +01:00