Commit Graph

330 Commits

Author SHA1 Message Date
Vitaly Baranov
235ea220ec SELECT count() FROM table now requires at least one column to be accessible in the table. 2020-12-30 15:00:08 +03:00
Vitaly Baranov
460006b502
Merge pull request #18232 from vitlibar/fix-access-rights-for-select-join
Fix access rights for SELECT JOIN.
2020-12-30 14:42:16 +03:00
Alexander Kuzmenkov
d4e5d5fdb4
Merge pull request #18455 from ClickHouse/aku/window-prototype
[wip] some window function fixes
2020-12-29 19:23:19 +03:00
hexiaoting
4adbdf364e Fix bug for orderby withfill with limit clause 2020-12-28 13:05:16 +03:00
Vitaly Baranov
9271b3d627 SELECT JOIN now requires the SELECT privilege on each of the joined tables. 2020-12-26 18:35:32 +03:00
Alexander Kuzmenkov
5bd025a180 fix DISTINCT and ORDER BY 2020-12-25 06:13:30 +03:00
Alexander Kuzmenkov
23d77a1698 remove debug output 2020-12-24 09:59:38 +03:00
Alexander Kuzmenkov
844239b1c3 tmp fixes (split me) 2020-12-24 07:03:33 +03:00
Alexander Kuzmenkov
f2b25c708c review fixes 2020-12-22 22:01:15 +03:00
Alexander Kuzmenkov
3f33e6b3e0 some review fixes 2020-12-22 20:46:31 +03:00
Alexander Kuzmenkov
52ace7a3d1 one plan step per window 2020-12-22 04:37:45 +03:00
Alexander Kuzmenkov
77b816caea cleanup 2020-12-22 02:47:14 +03:00
Alexander Kuzmenkov
85c1bc1253 Merge remote-tracking branch 'origin/master' into tmp 2020-12-21 10:46:21 +03:00
Amos Bird
9924cad96c
identify internal queries 2020-12-18 14:54:38 +08:00
Amos Bird
2f92d57af9
Better code. 2020-12-18 14:13:58 +08:00
Amos Bird
272311f6bd
Extensive information in system.query_log 2020-12-18 14:13:58 +08:00
Alexander Kuzmenkov
a1326414ff Merge remote-tracking branch 'origin/master' into tmp 2020-12-17 00:46:14 +03:00
sundy-li
5c9f84b2f4 Merge branch 'master' into alias_column_partition_prune 2020-12-16 18:44:00 +08:00
Alexander Kuzmenkov
fabb37d3c9 cleanup 2020-12-15 20:39:58 +03:00
Alexander Kuzmenkov
a23a9fd947 fixes after merge 2020-12-15 20:16:01 +03:00
Nikita Mikhaylov
31bef163ba
Merge pull request #17848 from azat/max_distributed_connections-fix
Fix max_distributed_connections
2020-12-15 17:34:38 +03:00
sundy-li
cf087002db Merge branch 'master' into alias_column_partition_prune 2020-12-15 16:37:00 +08:00
Alexander Kuzmenkov
a75ca3cb79 Merge remote-tracking branch 'origin/master' into tmp 2020-12-15 03:36:43 +03:00
Alexander Kuzmenkov
6d5b23de67 something works 2020-12-15 03:36:03 +03:00
sundy-li
d2209a1460 trivial fix 2020-12-13 17:33:02 +08:00
alexey-milovidov
bce02de691
Merge pull request #17539 from azat/remerge_sort_lowered_memory_bytes_ratio
Add remerge_sort_lowered_memory_bytes_ratio setting
2020-12-13 04:38:50 +03:00
sundyli
36ca21c24a
Merge branch 'master' into alias_column_partition_prune 2020-12-13 00:45:14 +08:00
sundy-li
9407028540 update 2020-12-13 00:42:15 +08:00
Alexander Kuzmenkov
d757f32300 Remove some redundant includes to speed up build 2020-12-11 02:58:11 +03:00
Alexander Kuzmenkov
dea446be2f Remove some redundant includes to speed up build 2020-12-11 02:56:57 +03:00
Alexander Kuzmenkov
ac8b896f36 returning constant column as window function 2020-12-10 22:06:52 +03:00
Azat Khuzhin
c3a4e5e7b7 Fix max_distributed_connections (one more time)
With prefer_localhost_replica=1 max_distributed_connections uses
max_threads before this patch.

Fixes: #14936
Previous fix: #9673
2020-12-07 01:19:53 +03:00
Azat Khuzhin
ccd794a676 Add remerge_sort_lowered_memory_bytes_ratio setting
Sometimes default ratio is not good enough (2), since it depends on lots
of factors:
- size of LIMIT
- max_memory_usage
- ...

So add a separate setting for it.

But note that it make sense to set
remerge_sort_lowered_memory_bytes_ratio only in range (1, 2]

Since <= 1 will just use more CPU, and > 2 will use more RAM and will
unlikely be faster.
2020-11-29 21:16:42 +03:00
Nikita Mikhaylov
084c75fa6e
Merge pull request #17309 from nikitamikhaylov/merging-sequential-consistency
Merging #16309
2020-11-26 15:26:05 +03:00
nikitamikhaylov
72c7cd6693 replace Context& to Settings& 2020-11-25 16:47:32 +03:00
Alexander Kuzmenkov
1d7dcef4a0 Merge remote-tracking branch 'origin/master' into HEAD 2020-11-24 21:45:10 +03:00
Alexander Kuzmenkov
412c2fe079 Merge remote-tracking branch 'origin/master' into HEAD 2020-11-23 19:51:18 +03:00
nikitamikhaylov
68bef22fda Merge branch 'master' of github.com:ClickHouse/ClickHouse into merging-sequential-consistency 2020-11-23 16:28:35 +03:00
sundy-li
fe8b11fd5f add replaceAliasColumnsInFilter function 2020-11-22 12:16:27 +08:00
sundy-li
ad99dab3ad add ColumnAliasesVisitor to improve partition prune for mergetree 2020-11-21 20:38:21 +08:00
Alexander Kuzmenkov
6cb378e072 cleanup 2020-11-19 18:52:11 +03:00
Nikolai Kochetov
13eceff55c Remove Converting transform and step. 2020-11-17 20:16:55 +03:00
Nikolai Kochetov
9b13d0e0eb Revert "Add ActionsDAG::updateHeader()"
This reverts commit b78657656c.
2020-11-11 20:17:26 +03:00
Nikolai Kochetov
58c4a7b890 Some renames. 2020-11-11 19:52:27 +03:00
Nikolai Kochetov
b78657656c Add ActionsDAG::updateHeader() 2020-11-11 16:50:29 +03:00
Nikolai Kochetov
1846bb3cac Merge branch 'master' into actions-dag-f14 2020-11-11 13:08:57 +03:00
feng lv
fec4080d42 Merge branch 'master' of github.com:ClickHouse/ClickHouse into union-distinct 2020-11-11 03:10:10 +00:00
Nikolai Kochetov
c6575c9032 Update ExpressionActions constructur 2020-11-10 19:27:55 +03:00
Nikolai Kochetov
195c941c4e Merge branch 'master' into storage-read-query-plan 2020-11-10 15:02:22 +03:00
feng lv
9194985d48 Merge branch 'master' of github.com:ClickHouse/ClickHouse into union-distinct 2020-11-10 06:09:39 +00:00
Nikolai Kochetov
6717c7a0af Merge branch 'master' into actions-dag-f14 2020-11-09 14:57:48 +03:00
Alexey Milovidov
5314185e25 Merge branch 'master' into azat-optimize_skip_unused_shards-optimization 2020-11-08 00:17:59 +03:00
feng lv
1ca7dcb0a8 fix conflict 2020-11-07 11:44:29 +00:00
Nikolai Kochetov
c10f733587 Merge branch 'master' into storage-read-query-plan 2020-11-06 15:43:46 +03:00
Nikolai Kochetov
9aeb757da4 Merge branch 'master' into actions-dag-f14 2020-11-06 15:04:20 +03:00
Nikolai Kochetov
40a9648269
Merge pull request #16308 from nikitamikhaylov/totals-having
Incorrect behaviour of SELECT WITH TOTALS
2020-11-05 11:27:28 +03:00
Alexander Kuzmenkov
faf1f1e0cd Merge remote-tracking branch 'origin/master' into HEAD 2020-11-05 11:09:11 +03:00
Nikolai Kochetov
7b61f5d641 Refactor more 2020-11-03 22:05:47 +03:00
Azat Khuzhin
e7f15dff55 Do not pass StoragePtr to ReadInOrderOptimizer::getInputOrder()
Looks like this is not required anymore, since #11745
2020-11-03 21:22:46 +03:00
Nikolai Kochetov
07a7c46b89 Refactor ExpressionActions [Part 3] 2020-11-03 14:28:28 +03:00
Nikolai Kochetov
ceb83602b8 Refactor 2020-11-02 15:07:01 +03:00
feng lv
e82ce52e2f fix 2020-11-01 14:57:41 +00:00
feng lv
382fff9009 fix 2020-11-01 13:54:07 +00:00
hchen9
feaab260d8 Fix conflict 2020-10-23 12:54:33 -07:00
nikitamikhaylov
d908cddb49 done 2020-10-23 22:09:02 +03:00
Nikolai Kochetov
c91b453630 Try fix tests. 2020-10-22 14:08:12 +03:00
Nikolai Kochetov
7fa045cff8 Merge branch 'master' into storage-read-query-plan 2020-10-22 13:31:10 +03:00
alexey-milovidov
adeba6bdd8
Merge pull request #15074 from amosbird/btc
Extend trivial count optimization.
2020-10-22 02:50:57 +03:00
alexey-milovidov
be7776608d
Merge pull request #15933 from ClickHouse/fix-global-in-result
Fix wrong result in case of GLOBAL IN and PREWHERE
2020-10-19 21:21:57 +03:00
Alexander Tokmakov
7d58992ea8 fix select count() 2020-10-14 16:15:15 +03:00
Nikolai Kochetov
534b60e242 Fix build. 2020-10-13 18:10:30 +03:00
Nikolai Kochetov
23afd74e1c Update InterpreterSelectQuery. 2020-10-13 17:55:22 +03:00
Nikolai Kochetov
1af0792f67 Update InterpreterSelectQuery. 2020-10-13 17:33:34 +03:00
Nikolai Kochetov
2bbdfc77ea Update creating sets. 2020-10-13 16:48:00 +03:00
Nikolai Kochetov
337098367b Try fix perf 2020-10-13 11:36:15 +03:00
Nikolai Kochetov
7e58f99f64 Merge branch 'master' into storage-read-query-plan 2020-10-12 13:12:39 +03:00
Amos Bird
867216103f
Extend trivial count optimization. 2020-10-08 18:08:17 +08:00
Amos Bird
c9ab87ed17
Fix explain syntax 2020-10-08 17:06:04 +08:00
Amos Bird
ac102540d0
Global WITH and WITH propagation. 2020-10-08 15:03:34 +08:00
Nikolai Kochetov
f9bf1e3406 Merge branch 'master' into storage-read-query-plan 2020-10-06 09:50:10 +03:00
Azat Khuzhin
587cde853e Avoid skipping unused shards twice (for query processing stage and read itself) 2020-10-02 22:42:09 +03:00
Nikolai Kochetov
bef96faa1a Tru fix tests. 2020-10-02 15:38:33 +03:00
hchen9
68888408da Pass context ptr to ref 2020-10-01 21:23:41 -07:00
hchen9
b3949db00f Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into trivial_count_seq_consistency 2020-10-01 21:15:26 -07:00
hchen9
b4494578d7 Support select_sequential_consistency in StorageReplicatedMergeTree.totalRows and totalBytes 2020-09-30 16:50:58 -07:00
hchen9
a5ac39b564 Pass Context parameter for IStorage.totalRows and IStorage.totalBytes 2020-09-30 16:47:42 -07:00
Artem Zuikov
0f6a6453fe
Remove multiple_joins_rewriter v1 (#15472) 2020-09-30 23:11:49 +03:00
Nikolai Kochetov
576ffadb17 Fix explain for ISourceStep. 2020-09-30 15:22:30 +03:00
hchen9
fda6bde428 improve change 2020-09-28 17:05:22 -07:00
Nikolai Kochetov
dea90009e3 Fix build 2020-09-25 16:03:12 +03:00
Nikolai Kochetov
62ef40394a
Merge pull request #14856 from ClickHouse/query-plan-for-creating-sets
Query plan for creating sets
2020-09-22 16:19:20 +03:00
Nikolai Kochetov
54c1f04b38 Review fixes. 2020-09-21 11:36:12 +03:00
Alexey Milovidov
059646743b Remove OpenCL 2020-09-19 17:20:00 +03:00
alexey-milovidov
acbdc51460
Merge pull request #14771 from amosbird/withsub
First attempt of supporting CTE
2020-09-19 16:25:34 +03:00
Artem Zuikov
28afbafa08 fix crash in RIGHT or FULL JOIN switch 2020-09-18 19:25:20 +03:00
Nikolai Kochetov
b26f11c00c Support StorageDistributed::read for QueryPlan. 2020-09-18 17:16:53 +03:00
Nikolai Kochetov
2ffc2b6927 Refactor IStorage::read with query plan. 2020-09-18 15:10:59 +03:00
Nikolai Kochetov
50674a320f Refactor IStorage::read with query plan. 2020-09-18 14:39:07 +03:00
Nikolai Kochetov
21bd45fb22
Update InterpreterSelectQuery.cpp 2020-09-17 12:57:48 +03:00
roman
b41421cb1c [settings]: introduce new query complexity settings for leaf-nodes
The new setting should allow to control query complexity on leaf nodes
excluding the final merging stage on the root-node. For example, distributed
query that reads 1k rows from 5 shards will breach the `max_rows_to_read=5000`,
while effectively every shard reads only 1k rows. With setting `max_rows_to_read_leaf=1500`
this limit won't be reached and query will succeed since every shard reads
not more that ~1k rows.
2020-09-17 10:37:05 +01:00