Commit Graph

5584 Commits

Author SHA1 Message Date
Dmitry Kardymon
99f02e0f6b Add const to trying to fix build 2023-07-04 22:06:17 +03:00
Nikita Mikhaylov
673c30f717
Merge branch 'master' into oss-fuzz-fixes 2023-07-04 19:52:41 +02:00
Han Fei
ca6930eb11
Revert "Revert "Merge pull request #50951 from ZhiguoZh/20230607-toyear-fix"" 2023-07-04 17:38:53 +02:00
Dmitry Kardymon
99518f772c Merge remote-tracking branch 'clickhouse/master' into Support-range-nullable 2023-07-04 13:05:19 +03:00
Dmitry Kardymon
2d904c9cc4 Merge remote-tracking branch 'clickhouse/master' into Fix-formatDateTime-with-fractional-negative-datetime64 2023-07-04 08:21:48 +03:00
Dmitry Kardymon
ed16828b70 Merge remote-tracking branch 'clickhouse/master' into ADQM-868 2023-07-04 08:18:57 +03:00
Alexey Milovidov
c25da7cbf4 Fix (benign) data rance in transform 2023-07-04 01:03:49 +02:00
Robert Schulze
29f93bd06d
More fixes, pt. II 2023-07-03 20:26:10 +00:00
Robert Schulze
9660291ab3
my fixes 2023-07-03 18:33:59 +00:00
Dmitry Kardymon
5b85e1ce8a Special build check fix 2023-07-03 18:09:08 +00:00
Nikita Mikhaylov
af603c2cc6 Fixed stack overflow on Field destruction 2023-07-03 16:40:04 +02:00
Dmitry Kardymon
1a40e30797 Add initcapUtf8: impl + tests 2023-07-03 11:37:55 +00:00
Robert Schulze
fe49e98455
Follow-up to re2 update 2023-06-02 (#50949) 2023-07-03 08:28:25 +00:00
FFFFFFFHHHHHHH
4089b6f69f
Merge branch 'master' into jaccard_similarity 2023-07-02 16:15:25 +08:00
FFFFFFFHHHHHHH
8c0463fdd4 fix 2023-07-02 16:14:08 +08:00
Dmitry Kardymon
d6dacd3ccf Fix test with num 2023-06-30 13:53:20 +00:00
Dmitry Kardymon
1cf021c0b1 Add initcap prototype / tests 2023-06-30 13:11:06 +00:00
Dmitry Kardymon
407a7e3cc5 Edit assert message 2023-06-30 09:55:55 +00:00
Dmitry Kardymon
8af96f7a17 Add uuid to uint128 converting 2023-06-30 09:49:29 +00:00
Alexey Milovidov
0f2d731f1b
Merge branch 'master' into add-test-43358 2023-06-30 12:17:52 +03:00
Alex Cheng
f497ba88c2 correct an exception message. 2023-06-30 14:52:47 +08:00
Alexey Milovidov
cf60f45885
Merge branch 'master' into add-test-43358 2023-06-29 23:14:08 +03:00
Alexey Milovidov
b6a37fbf18
Merge branch 'master' into many-fixes-2 2023-06-29 22:36:33 +03:00
Robert Schulze
5b78b3903b
Fix logical error in tupleElement() 2023-06-28 18:35:33 +00:00
Robert Schulze
bf54fb4caa
tupleElement(): Return default value for out-of-bounds-index
Makes the actual and the documented behavior consistent.
2023-06-28 18:35:32 +00:00
Robert Schulze
eea3c39959
Cosmetics 2023-06-28 18:35:27 +00:00
Alexey Milovidov
7e6d606b1c Remove bad code and fix a bug 2023-06-28 10:41:39 +02:00
李扬
748cd13fc3
Merge branch 'master' into improve_geohash 2023-06-28 15:02:05 +08:00
Ilya Yatsishin
d3b8b454f8
Fix segfault in MathUnary 2023-06-27 19:19:58 +02:00
Dmitry Kardymon
e34597e43d Fix tabulation 2023-06-27 18:36:32 +03:00
Dmitry Kardymon
8ad1d4b94f Add comment 2023-06-27 06:31:30 +00:00
Dmitry Kardymon
5a4a774db7 Style fix 2023-06-27 06:06:56 +00:00
Alexey Milovidov
b5635887c3 Merge remote-tracking branch 'origin/refactor-subqueries-for-in' into many-fixes 2023-06-27 05:39:44 +02:00
Alexey Milovidov
a686833f8e Merge branch 'fix-logical-error-address-to-line-with-inlines' into many-fixes 2023-06-27 05:26:05 +02:00
Alexey Milovidov
4615aaacb6 Merge branch 'revert-50951' into many-fixes 2023-06-27 05:23:46 +02:00
Alexey Milovidov
d996dba7c3 Merge branch 'fix-msan-lower-upper' into many-fixes 2023-06-27 05:20:45 +02:00
Alexey Milovidov
1d55be0bdc Merge branch 'replace-trycatch' of github.com:rschu1ze/ClickHouse into many-fixes 2023-06-27 05:19:06 +02:00
Alexey Milovidov
e81b418137 Merge branch 'remove-siphash64-reference-keyed' into many-fixes 2023-06-27 05:16:37 +02:00
Alexey Milovidov
93884f4d34 Merge branch 'generic-transform' into many-fixes 2023-06-27 05:16:16 +02:00
Dmitry Kardymon
5521bf3f35 Fix null constant case 2023-06-26 20:19:34 +00:00
Robert Schulze
45c263cbb5
Replace try/catch logic in hasTokenOrNull() by sth more lightweight 2023-06-26 15:06:58 +00:00
Dmitry Kardymon
7d4e7e320d Impelement support for function range of Nullable argument 2023-06-26 12:03:25 +00:00
Dmitry Kardymon
c85ade9c27 Add const multiplier 2023-06-26 07:44:19 +00:00
李扬
0e15266170
Merge branch 'master' into improve_geohash 2023-06-26 14:54:44 +08:00
Alexey Milovidov
8e6f665585 Fix build 2023-06-26 05:57:38 +02:00
Alexey Milovidov
b8e6bd3299
Merge branch 'master' into refactor-subqueries-for-in 2023-06-26 06:05:12 +03:00
Alexey Milovidov
477b707ff1 Revert "Merge pull request #50951 from ZhiguoZh/20230607-toyear-fix"
This reverts commit 6bbd0d144d, reversing
changes made to 74cb79769b.
2023-06-26 02:02:24 +02:00
Alexey Milovidov
071cd58be8 Fix "logical error" in addressToLineWithInlines 2023-06-25 08:31:02 +02:00
Alexey Milovidov
650e80663c Fix MSan report in lowerUTF8/upperUTF8 2023-06-25 05:59:02 +02:00
Alexey Milovidov
3ed86867f8 Remove sipHash128ReferenceKeyed 2023-06-24 23:06:13 +02:00
Alexey Milovidov
a7febd1c13 Backward compatibility 2023-06-24 08:28:23 +02:00
Alexey Milovidov
ed3ead3493 Add support for Nullable 2023-06-24 07:23:17 +02:00
Alexey Milovidov
3746e274b8 Support empty arrays 2023-06-24 07:23:15 +02:00
Alexey Milovidov
cb2d395410 Add generic implementation of function transform 2023-06-24 06:52:28 +02:00
Alexey Milovidov
396eb70426 Remove garbage from function transform 2023-06-24 05:49:12 +02:00
Alexey Milovidov
786987a29a Remove garbage from function transform 2023-06-24 05:49:12 +02:00
Yakov Olkhovskiy
09806bc363
Merge branch 'master' into cast-ipv6-to-ipv4 2023-06-23 10:53:46 -04:00
Dmitry Kardymon
2d11ce43f1 Build fix 2023-06-23 05:17:01 +00:00
Dmitry Kardymon
d2635bff64 Merge remote-tracking branch 'origin/master' into ADQM-868 2023-06-22 19:56:15 +00:00
Dmitry Kardymon
65e5d40cae Fix formatDateTime() with fractional negative datetime64 2023-06-22 19:38:41 +00:00
Andrey Zvonov
d4316c7189
Merge branch 'master' into zvonand-implicit-tz 2023-06-22 17:23:20 +02:00
Nikolai Kochetov
22e49748b5 Cleanup. 2023-06-22 14:23:04 +00:00
Nikolai Kochetov
a940031878 Merge branch 'master' into refactor-subqueries-for-in 2023-06-22 12:18:48 +02:00
Sema Checherinda
01de36f1fa
Merge pull request #50395 from CheSema/better-log
require `finalize()` call before d-tor for all writes buffers
2023-06-21 21:12:02 +02:00
Alexey Milovidov
f0d93d5b60
Merge pull request #51199 from ClickHouse/empty_array_get_name
Avoid initializing DateLUT from emptyArray function registration
2023-06-21 20:29:28 +03:00
Alexander Gololobov
a708adecee Pass element type as param to ctor 2023-06-21 14:04:45 +02:00
Andrey Zvonov
b4f2e4020d
Merge branch 'master' into zvonand-implicit-tz 2023-06-21 13:41:35 +02:00
Dmitry Kardymon
d58152cb82 Add constants / fix tests 2023-06-21 08:04:40 +00:00
Sema Checherinda
9b0c3359cf
Merge branch 'master' into better-log 2023-06-20 20:37:36 +02:00
Dmitry Kardymon
cda37f4d73 Fix negative support for date_diff/age(), fix whole int TransformDateTime64 2023-06-20 18:31:04 +00:00
Alexey Milovidov
ced1ae7287
Update emptyArray.cpp 2023-06-20 21:20:25 +03:00
Alexander Gololobov
29f6ce871d Avoid initializing DateLUT from emptyArray function registration 2023-06-20 19:00:41 +02:00
Dmitry Kardymon
d1cb371d8d Style fix (whitespaces) 2023-06-20 08:53:25 +00:00
Maksim Kita
7e5017dd31 Fixed tests 2023-06-20 11:42:22 +03:00
Maksim Kita
aa28a1f259 Fixed tests 2023-06-20 11:42:22 +03:00
Maksim Kita
6e26fde707 Updated tests 2023-06-20 11:42:22 +03:00
Maksim Kita
129b97c727 JIT infrastructure refactoring 2023-06-20 11:42:22 +03:00
Dmitry Kardymon
792cdb6da5 Add millisecond support to age() / add tests 2023-06-20 08:26:59 +00:00
Andrey Zvonov
07191ce10d
Merge branch 'master' into zvonand-implicit-tz 2023-06-20 00:24:53 +02:00
Sergei Trifonov
5867f39fc7
Merge pull request #50675 from ClickHouse/unify-priorities-pools
Unify priorities for connection pools
2023-06-19 17:16:15 +02:00
Nikolai Kochetov
8e7d06e0a4 Remove isReady from FutureSet iface. 2023-06-19 12:56:24 +00:00
Sema Checherinda
cf31fdb4d5 no finalize at d-tor in compression 2023-06-16 16:38:18 +02:00
Sema Checherinda
1cb02e2710 do call finalize for all buffers 2023-06-16 16:38:18 +02:00
Dmitry Kardymon
02b5b50e41 Add milli/micro seconds support for date_diff 2023-06-16 12:39:46 +00:00
zvonand
4155d13d69 merge master and resolve conflict 2023-06-16 02:20:32 +02:00
zvonand
e60506f41b changes requested in review 2023-06-16 02:16:04 +02:00
Zhiguo Zhou
d780d0bab1 fix style
Move error throws in Transform to FunctionDateOrDateTimeToSomething.
2023-06-15 21:48:02 +08:00
Han Fei
9e81b2fd5d fix style 2023-06-15 21:48:02 +08:00
Zhiguo Zhou
d14299eb09 The general optimization of predicates with date/datetime converters
As is suggested in issue #15257, the function preimage is a general
solution to the optimization problem with predicates containing the
date and datetime converters. This commit implements the idea by
adding the new methods, hasInformationAboutPreimage and getPreimage,
to IFunction/IFunctionBase, and having the specific convert functions
define their own preimage. Moreover, we added a new pass in the
TreeOptimizer and a new AST visitor for in-place rewriting the AST
with the converters' preimage.

Specifically, the optimization is applied to toYear and toYYYYMM.
2023-06-15 21:48:02 +08:00
Kseniia Sumarokova
31e08635bf
Merge branch 'master' into unify-priorities-pools 2023-06-15 12:51:45 +02:00
Robert Schulze
edd29492c3
Merge pull request #50893 from rschu1ze/snowflake-crash
Fix LOGICAL_ERROR in snowflakeToDateTime*()
2023-06-14 09:42:21 +02:00
Robert Schulze
76f69f2b44
Revert overengineering 2023-06-13 15:52:06 +00:00
Robert Schulze
3e3b8ff5f6
More robustness 2023-06-13 12:24:31 +00:00
FFFFFFFHHHHHHH
80a897639e Merge remote-tracking branch 'origin/master' into jaccard_similarity 2023-06-13 19:31:04 +08:00
Kseniia Sumarokova
0ab3dc9261
A bit safer UserDefinedSQLFunctionVisitor (#50913)
* Update UserDefinedSQLFunctionVisitor.cpp

* Update UserDefinedSQLFunctionVisitor.cpp

---------

Co-authored-by: Nikita Mikhaylov <mikhaylovnikitka@gmail.com>
2023-06-13 11:25:13 +02:00
Robert Schulze
79bc884733
Stabilize tests 2023-06-13 08:56:22 +00:00
ltrk2
edb4a644b1 Update FunctionsCodingIP.cpp 2023-06-12 14:23:22 -04:00
ltrk2
a4285d56b2 Fix compilation error on big-endian platforms 2023-06-12 14:23:22 -04:00
Robert Schulze
65d83e45cb
Fix crash in snowflakeToDateTime(), follow-up to #50834 2023-06-12 16:21:49 +00:00
Robert Schulze
128e8c20d5
Merge pull request #50709 from arenadata/ADQM-867
Added numeric arguments support to some Date/DateTime conversion functions
2023-06-12 17:08:14 +02:00
Dmitry Kardymon
9fd3f197c6
Merge branch 'master' into ADQM-867 2023-06-11 22:06:37 +03:00
Robert Schulze
2146c35608
Fix style 2023-06-11 07:40:39 +00:00
Robert Schulze
72b9d75a84
Add compat setting for non-const timezones
SQL function toTimezone() converts a Date or DateTime into another
timezone. The problem is that the timezone is part of the Date /
DateTime type but not part of the internal representation (value). This
led to the fact that toTimeZone() wqith non-const timezones produced
wrong and misleading results until #48471 (shipped with v23.4) enforced
a const timezone.

Unfortunately, this PR also broke existing table definitions with
non-const timezones, e.g. in ALIAS expressions. So while #48471
addressed the issue appropriately, it is really backwards-incompatible.

This PR adds a setting to toggle the behavior and makes it also part of
the compatibility profile.
2023-06-10 16:56:42 +00:00
Nikolai Kochetov
6ce8329bda Merge branch 'master' into refactor-subqueries-for-in 2023-06-09 20:04:27 +02:00
Dmitry Kardymon
d0c2c1dbad Add test and reorder if's 2023-06-09 12:06:43 +00:00
Dmitry Kardymon
7a02a70ad4 Add value to exceptions text 2023-06-09 11:11:49 +00:00
Dmitry Kardymon
de70e322cf Fix by pull request comments 2023-06-09 10:29:44 +00:00
Andrey Zvonov
d95be4162f
Merge branch 'master' into zvonand-implicit-tz 2023-06-08 18:34:45 +03:00
Dmitry Kardymon
7263769d20 Add constexpr / fix date check 2023-06-08 06:12:54 +00:00
Nikita Mikhaylov
c0f2141bd0
Revert "date_trunc function to always return DateTime type" (#50670) 2023-06-07 19:51:41 +02:00
serxa
2df0e0c669 Unify priorities for connections 2023-06-07 16:25:52 +00:00
Dmitry Kardymon
cf886d8ced Remove IsConvertible() 2023-06-06 11:08:21 +00:00
robot-ch-test-poll
e1889ffb3a
Merge pull request #50529 from kitaisreal/function-if-constant-folding
Function if constant folding
2023-06-05 17:29:29 +02:00
Maksim Kita
c860db0fb7 Fixed tests 2023-06-05 10:32:46 +03:00
johanngan
8d4206df66 Review comments: Use constexpr-if in more places
Also add a comment about the apparent lack of type checking on the limit
column.
2023-06-04 23:46:04 -05:00
johanngan
c0f162c5b6 Add dictGetAll function for RegExpTreeDictionary
This function outputs an array of attribute values from all regexp nodes
that matched in a regexp tree dictionary. An optional final argument can
be passed to limit the array size.
2023-06-04 23:46:04 -05:00
Azat Khuzhin
bf127f4e1e MSan support for Rust
Previously you have to unpoison memory from the Rust, however Rust does
supports MSan, so let's simply use it.

But for this we need nightly Rust and recompile standard library.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-06-04 23:04:55 +02:00
Dmitry Kardymon
c032dee3b4 Merge remote-tracking branch 'origin/master' into ADQM-867 2023-06-04 18:45:47 +00:00
Maksim Kita
46cbdeeb7e Fixed tests 2023-06-04 15:02:46 +03:00
Maksim Kita
7a7e03a2ff Function if constant folding 2023-06-03 14:16:59 +03:00
Alexey Milovidov
054b908b9c
Merge pull request #50416 from ClickHouse/revert-49656-rs/entropy-learned-hashing
Revert "Add SQL functions for Entropy Learned Hashing"
2023-06-03 06:50:48 +03:00
Kruglov Pavel
f87f98fb80
Merge pull request #47409 from Avogar/random-structure
Add new function generateRandomStructure
2023-06-02 18:50:35 +02:00
Robert Schulze
12993890a8
Merge branch 'master' into revert-49656-rs/entropy-learned-hashing 2023-06-02 15:32:33 +02:00
Dmitry Kardymon
fa5f890a7a Added ru function descriptions (docs) 2023-06-02 12:03:50 +00:00
Robert Schulze
7070eac9db
Merge branch 'ClickHouse:master' into fix-const-int-hashing 2023-06-02 10:57:18 +02:00
Dmitry Kardymon
c7088a8180 Trying to fix build 2023-06-02 07:26:55 +00:00
Dmitry Kardymon
8a10baec7f Add dateTime range check 2023-06-02 06:25:00 +00:00
Andrey Zvonov
2e427ee028
Merge branch 'master' into zvonand-implicit-tz 2023-06-02 01:15:56 +03:00
Nikolai Kochetov
92859ebb3b Fixing more tests. 2023-06-01 21:15:15 +00:00
Dmitry Kardymon
a22e80eed5 Remove whitespaces 2023-06-01 19:52:48 +00:00
Dmitry Kardymon
38abcd1c44 Add nullable support to DateTimeTransformImpl 2023-06-01 19:25:53 +00:00
Dmitry Kardymon
54d526c75c Add cast type supprt to DateTimeTransformImpl 2023-06-01 14:22:57 +00:00
Robert Schulze
45b1fcdeda
Merge pull request #50315 from arenadata/ADQM-810
Add new function toLastDayOfWeek()
2023-06-01 16:19:14 +02:00
Robert Schulze
03628bde42
Fix hashing of const integer values 2023-06-01 12:54:34 +00:00
Robert Schulze
93ba75b370
Remove parentheses from single-line if/for 2023-06-01 12:51:38 +00:00
Robert Schulze
56fa98cb77
Rename variables for better readability 2023-06-01 12:51:30 +00:00
Alexander Tokmakov
9a2b3afb7e
Revert "Fix msan issue in keyed siphash" 2023-06-01 15:02:32 +03:00
Kruglov Pavel
7485962443
Merge pull request #50343 from Avogar/fix-bit-shift-func
Fix bitShift* functions with both constant arguments
2023-06-01 13:53:36 +02:00
Robert Schulze
08d98329b0
Revert "Add SQL functions for Entropy Learned Hashing" 2023-06-01 10:12:09 +02:00
Yakov Olkhovskiy
3af7e0a6fa
better exception message 2023-05-31 11:26:58 -04:00
Yakov Olkhovskiy
0d4ed32bac
better exception message 2023-05-31 11:25:33 -04:00
Robert Schulze
c5343679df
Merge branch 'master' into msan-siphash-keyed 2023-05-31 09:05:24 +02:00
Robert Schulze
fc157b3dad
Merge branch 'master' into msan-siphash-keyed 2023-05-30 21:30:33 +02:00
Nikolai Kochetov
8cec00dd6e Merge branch 'master' into refactor-subqueries-for-in 2023-05-30 18:08:37 +02:00
Dmitry Kardymon
a48c4fd370 Merge remote-tracking branch 'origin/master' into ADQM-884 2023-05-30 14:56:37 +00:00
avogar
c87e8c1f23 Fix bitShift* functions with both constant arguments 2023-05-30 12:12:54 +00:00
Dmitry Kardymon
c25980bcf4 Trying to fix toDateOrDefault() 2023-05-30 12:02:44 +00:00
Robert Schulze
1cbce21968
Better, pt. II 2023-05-30 11:46:23 +00:00
Andrey Zvonov
87fc780c14
Merge branch 'master' into zvonand-implicit-tz 2023-05-30 13:13:46 +03:00
Robert Schulze
2d06947522
Better 2023-05-30 09:06:45 +00:00