Commit Graph

212 Commits

Author SHA1 Message Date
Nikolai Kochetov
66d9d92de4 Fix wrong literal name in KeyCondition using ActionsDAG. 2022-09-13 18:47:29 +00:00
Duc Canh Le
65b64010a0 move out-of-bound check into set::areTypesEqual 2022-09-02 11:56:13 +08:00
Duc Canh Le
763328ef53 Merge branch 'master' into ch_canh_fix_set 2022-09-02 11:45:13 +08:00
Duc Canh Le
55c20ce45b fix tryGetPreparedSet crash when same set expression built from different columns 2022-08-31 21:43:08 +08:00
Kruglov Pavel
624af5bffd
Update src/Storages/MergeTree/KeyCondition.cpp 2022-08-30 13:18:05 +02:00
Amos Bird
15a69bce84
Use index when row_policy_filter is always false 2022-08-29 16:44:32 +08:00
Amos Bird
fa8fab2e8f
Fix KeyCondition with other filters 2022-08-11 19:20:44 +08:00
vdimir
b7c5c54181
Fix build 2022-08-10 13:43:55 +00:00
vdimir
5eb4cd39e0
Merge branch 'master' into refactor-prepared-sets 2022-08-10 11:47:49 +00:00
Maksim Kita
a576a55375 Fixed build 2022-08-09 15:03:59 +02:00
vdimir
708747ca0b
Merge branch 'master' into refactor-prepared-sets 2022-08-08 14:27:18 +02:00
Nikolai Kochetov
60599197b2 Review fixes. 2022-08-04 15:23:10 +00:00
Nikolai Kochetov
658a269d56
Merge branch 'master' into use-dag-in-key-condition 2022-08-04 16:18:40 +02:00
Vladimir C
a627b00c43
Merge branch 'master' into refactor-prepared-sets 2022-08-04 13:27:38 +02:00
Wangyang Guo
91e3e2f18b KeyCondition: optimize applyFunction in multi-thread scenario
Construct and deconstruct args (ColumnsWithTypeAndName) will inc/dec
ref_count (actually this is a atomic lock inc/dec operation) to share_ptr,
which may share the same DataTypePtr among different threads. This will
have a lock contention issue in large parallel situation.

The patch try to minimize `args` scope and reduce unnecessary
construct/destory of instances. It will improve the performance in
multi-thread cases.
2022-08-02 16:16:16 +08:00
Nikolai Kochetov
6206e468a4 Ignor materialize function for ActionsDAG in PK analysis. 2022-07-27 17:02:48 +00:00
vdimir
8eecb9ef82
upd PreparedSets: rename/change signature of methods, add comments 2022-07-27 11:22:16 +00:00
vdimir
5ce2960f03
Get rid of SelectQueryInfoBase -> SelectQueryInfo 2022-07-26 18:39:09 +00:00
vdimir
d9928ac93d
Add methods to SubqueryForSet, do not use refernce to SetPtr 2022-07-26 18:39:09 +00:00
vdimir
1e3fa2e01f
Refactor PreparedSets/SubqueryForSet 2022-07-26 18:39:02 +00:00
Nikolai Kochetov
1ce8e714d3 Fixing build. 2022-07-25 12:30:01 +00:00
Nikolai Kochetov
dd65a36c59 Fix another one test. 2022-07-22 19:11:25 +00:00
Nikolai Kochetov
a00bcd389f Fixing build 2022-07-19 19:33:14 +02:00
Nikolai Kochetov
eaeb30a71a Merge branch 'master' into use-dag-in-key-condition 2022-07-19 18:39:52 +02:00
avogar
9291d33080 Pass const std::string_view & by value, not by reference 2022-07-14 16:11:57 +00:00
Anton Popov
52db1b35a1 improve performace of insertion to columns of type JSON 2022-06-22 17:45:51 +00:00
Robert Schulze
118e94523c
Activate clang-tidy warning "readability-container-contains"
This check suggests replacing <Container>.count() by
<Container>.contains() which is more speaking and in case of
multimaps/multisets also faster.
2022-04-18 23:53:11 +02:00
taiyang-li
8dbf1c60e7 merge master and fix conflict 2022-03-23 11:36:50 +08:00
Amos Bird
4d85c2fc8b
Use castColumnAccurateOrNull 2022-03-18 17:47:04 +08:00
Amos Bird
10996b1434
Fix mixed constant type during partition pruning 2022-03-18 17:47:03 +08:00
Amos Bird
a19224bc9b
Fix partition pruner: non-monotonic function IN 2022-03-09 15:48:42 +08:00
李扬
daa27d0bda
Merge branch 'master' into rocksdb_metacache 2022-02-12 07:50:12 -06:00
Anton Popov
6a8e35930f fix comparison with integers and floats in index analysis 2022-02-11 18:20:37 +03:00
Anton Popov
2fcd69baf7 fix comparison with integers and floats in index analysis 2022-02-11 17:15:27 +03:00
taiyang-li
73def8b483 merge master and solve conflict 2022-01-24 11:01:43 +08:00
Amos Bird
e62f4e50a6
Fix KeyCondition with no common types 2022-01-20 21:56:12 +08:00
liyang
37ba8004ff Speep up mergetree starting up process 2021-12-18 16:39:59 +08:00
mergify[bot]
d729cd50b3
Merge branch 'master' into fixnullablekey 2021-11-30 11:44:35 +00:00
Amos Bird
29c87b2f44
Fix nullable key 2021-11-29 20:49:01 +08:00
Raúl Marín
f0ee0724ac Reduce dependencies on ASTSelectQuery.h
243 -> 152
2021-11-26 18:35:24 +01:00
sundy-li
d8aaac36ec Add stable order by tests result 2021-11-09 21:34:55 +08:00
sundy-li
45cab9f3b0 Add stable order by tests result 2021-11-09 21:31:31 +08:00
sundy-li
3a981de643 ISSUES-30801: Remove not like function into RPNElement 2021-11-09 10:57:37 +08:00
alexey-milovidov
38f7d1ebc2
Update KeyCondition.cpp 2021-11-01 22:59:57 +03:00
mergify[bot]
3cb034880b
Merge branch 'master' into allow_nulls_first_in_key_condition 2021-10-31 12:19:08 +00:00
Dmitrii Kovalkov
e3ae32f763 Allow nulls first 2021-09-23 19:39:15 +03:00
Kruglov Pavel
8a67c3cf44
Merge pull request #28636 from amosbird/nullable-index-fix
Fix nullable/lowcardinality primary key with constant conversion
2021-09-15 15:56:19 +03:00
Amos Bird
8fac97692a
Fix nullable primary key with constant conversion 2021-09-06 15:11:37 +08:00
Kruglov Pavel
f559c34113
Merge pull request #28302 from amosbird/binaryconstantwrap
Always monotonic for non-zero division
2021-09-03 20:02:54 +03:00
Amos Bird
4624bf70b0
Always monotonic for non-zero division 2021-08-28 23:33:18 +08:00
Amos Bird
f2374a6916
Better nullable primary key implementation. 2021-08-28 17:48:28 +08:00
mergify[bot]
319e5af6eb
Merge branch 'master' into short-circuit 2021-08-13 13:01:46 +00:00
kssenii
dcc6f597dc Move templates from FunctionsConvertion 2021-08-11 19:09:51 +00:00
kssenii
7555fc19fd Revert "Move some templates"
This reverts commit 7f247becca.
2021-08-11 18:49:25 +00:00
kssenii
7f247becca Move some templates 2021-08-11 07:32:46 +00:00
Pavel Kruglov
70b51133c1 Try to simplify code 2021-08-09 18:01:08 +03:00
Pavel Kruglov
0662df8b76 Fix performance with JIT, add arguments to function isSuitableForShortCircuitArgumentsExecution 2021-08-09 17:54:14 +03:00
Pavel Kruglov
e792fa588f Mark all Functions as sutable or not for executing as short circuit arguments 2021-08-09 17:50:09 +03:00
kssenii
9ca422f0c5 Introduce CAST for internal usage 2021-08-07 09:03:10 +00:00
Nikolai Kochetov
7a24e72e76 Merge branch 'master' into fix-header-for-scalar-query-with-empty-result 2021-07-19 15:48:44 +03:00
Nikolai Kochetov
96e20e2641 Fix some tests. 2021-07-19 15:35:55 +03:00
alexey-milovidov
b52411a715
Merge pull request #12455 from amosbird/npc
Nullable primary key with correct KeyCondition
2021-07-18 17:52:20 +03:00
Nikolai Kochetov
c22f856d36 Fix indexHint 2021-06-23 15:19:22 +03:00
Nikolai Kochetov
a45290bfb3 Fix some tests. 2021-06-22 18:52:14 +03:00
Nikolai Kochetov
f5f57781b7 Fix build after merge. 2021-06-22 17:45:22 +03:00
Nikolai Kochetov
3dc0b9c096 Merge branch 'master' into use-dag-in-key-condition 2021-06-22 17:02:01 +03:00
Nikolai Kochetov
47f130d39c Try use expression for KeyCondition from query plan. 2021-06-22 16:54:00 +03:00
Nikolai Kochetov
21e39e10ea Update KeyCondition constructor 2021-06-22 13:28:56 +03:00
Nikolai Kochetov
d15d16fee0 Fix build. 2021-06-22 10:26:45 +03:00
Nikolai Kochetov
68176f064b Fix some tests. 2021-06-21 20:28:15 +03:00
Nikolai Kochetov
eef6c73030 Use DAG in KeyCondition 2021-06-21 19:17:05 +03:00
Anton Popov
ffa56bde24 fix usage of index with array columns and ARRAY JOIN 2021-06-21 15:34:05 +03:00
Nikolai Kochetov
47387d4faa Merge branch 'master' into use-dag-in-key-condition 2021-06-21 14:10:09 +03:00
Amos Bird
f2ed5ef42b
Nullable primary key with correct KeyCondition 2021-06-18 23:04:24 +08:00
Kseniia Sumarokova
e08c05cdf5
Merge pull request #25295 from ClickHouse/remove-some-code-from-key-condition
Remove some code from KeyCondition.
2021-06-16 10:12:12 +03:00
Nikolai Kochetov
96d98ff020 Add comment 2021-06-15 21:42:26 +03:00
mergify[bot]
7959d92029
Merge branch 'master' into minor-changes-3 2021-06-15 18:07:24 +00:00
Nikolai Kochetov
80a13c489b Revert back moduloLegacy check for canConstantBeWrappedByFunctions. 2021-06-15 18:21:31 +03:00
Nikolai Kochetov
481b87b37a Remove some code from keyCondition. 2021-06-15 16:47:37 +03:00
Nikita Mikhaylov
a52bba91b7
Merge pull request #16401 from abyss7/ast-table-identifier-2
ASTTableIdentifier part #2: Introduce ASTTableIdentifier
2021-06-15 13:51:30 +03:00
Alexey Milovidov
447d7bb8cd Minor changes 2021-06-14 07:13:35 +03:00
Nikolai Kochetov
6197d20c18
Update KeyCondition.cpp 2021-06-08 15:48:14 +03:00
Nikolai Kochetov
c4832fd3c0 Added test. 2021-06-07 21:24:32 +03:00
Nikolai Kochetov
0d2a839ca4 Fix tests. 2021-06-07 16:41:40 +03:00
Nikolai Kochetov
397f6133e0 Refactor canConstantBeWrappedByMonotonicFunctions function. 2021-06-04 20:56:56 +03:00
Nikolai Kochetov
3e5a1cda60 Revert 2021-06-03 17:44:59 +03:00
Nikolai Kochetov
726e22ea1d Always return false for canConstantBeWrappedByMonotonicFunctions. 2021-06-03 16:26:04 +03:00
Nikolai Kochetov
dee032c899 Part 2. 2021-06-03 15:27:38 +03:00
Nikolai Kochetov
38966e3e6b Part 2. 2021-06-03 15:26:02 +03:00
Nikolai Kochetov
c855cf7057 Part 1. 2021-06-02 19:56:24 +03:00
Ivan Lezhankin
365e52817b More fixes due to "in" function arguments being incorrectly checked as ASTIdentifier 2021-06-01 14:20:03 +03:00
kssenii
70469429c1 Fixes 2021-05-24 23:39:56 +00:00
kssenii
1ffaf1d793 Better check 2021-05-23 21:53:32 +00:00
kssenii
fcfec83875 Fix comparisons with modulo key (version 2) 2021-05-21 16:40:47 +00:00
kssenii
30845a383f Fix comparisons with modulo key 2021-05-21 15:01:41 +00:00
Maksim Kita
947f28d430 IFunction refactoring 2021-05-15 20:33:15 +03:00
Alexey Milovidov
a5a4e64ba7 Fix a few PVS-Studio warnings 2021-04-27 07:22:32 +03:00
alexey-milovidov
186b1128d0
Merge pull request #23310 from amosbird/fixbugindex
Don't relax NOT conditions during partition pruning.
2021-04-27 07:13:18 +03:00
alexey-milovidov
cae5260817
Update KeyCondition.cpp 2021-04-24 05:34:35 +03:00
Amos Bird
32c84f77c3
Resurrect indexHint function. 2021-04-20 19:27:23 +08:00