Commit Graph

6100 Commits

Author SHA1 Message Date
Azat Khuzhin
190ce217bb Disable GROUP BY statistics for optimize_aggregation_in_order
This statistics significantly decrease performance of
optimize_aggregation_in_order with a prefix key.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-29 06:58:27 +03:00
Azat Khuzhin
767acd53fb Add ability to pass range of rows to Aggregator
v2: fix compiled aggregate functions (seek result to row_start)
v3: fix compiled aggregate functions (seek args to row_start)
v4: change signatures for JIT
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-29 06:57:55 +03:00
Alexey Milovidov
d8fa806fca
Merge pull request #36360 from ClickHouse/optimize-asynchronous-metric-log
Optimize `system.asynchronous_metric_log`
2022-04-28 20:16:17 +03:00
zhanglistar
7d798b3655
Count distinct optimization by using subquery of group by (#35993) 2022-04-28 14:55:37 +02:00
Maksim Kita
ec47abe9af
Merge pull request #36482 from Enmk/fix_session_log_error_on_local_and_tcp_interserver_session
Fixed missing enum values for ClientInfo::Interface
2022-04-28 13:06:19 +02:00
Vitaly Baranov
641a5f5e35
Merge pull request #36198 from vitlibar/backup-improvements-3
Backup for replicated tables and other improvements
2022-04-28 09:23:53 +02:00
Alexey Milovidov
60e512ac4b Fix for table structure comparison 2022-04-28 05:10:57 +02:00
mergify[bot]
b7e63154df
Merge branch 'master' into optimize-asynchronous-metric-log 2022-04-27 18:27:27 +00:00
Kseniia Sumarokova
0d09bb9897
Merge pull request #36699 from amosbird/bettermysqlhandler
Slightly better mysql handler
2022-04-27 17:07:35 +02:00
Amos Bird
1cba00478d
Slightly better mysql handler 2022-04-27 18:28:09 +08:00
Alexey Milovidov
b8a9f1411a
Merge pull request #36649 from azat/system.processes-is_all_data_sent
clickhouse-test: improve left queries after the test hardening
2022-04-27 05:21:22 +03:00
Vitaly Baranov
a8e924caf6 Make BACKUP & RESTORE synchronous by default. 2022-04-26 18:45:39 +02:00
Kseniia Sumarokova
81db081b88
Merge pull request #36639 from kssenii/better-drop-cache
Improve drop cache query
2022-04-26 11:25:46 +02:00
Azat Khuzhin
6339a48923 Add is_all_data_sent into system.processes
v2: fix SHOW PROCESSLIST (does not have process list entry)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-26 12:15:00 +03:00
Vitaly Baranov
78bcb96098 Rename backup & restore setting 'async' -> 'sync', and make backup & restore async by default. 2022-04-26 09:51:19 +02:00
mergify[bot]
4e82b56a8d
Merge branch 'master' into optimize-asynchronous-metric-log 2022-04-26 05:40:49 +00:00
alesapin
92296484e7
Merge pull request #36348 from rschu1ze/erase_if3
Replace remove-erase idiom by C++20 erase()/erase_if()
2022-04-25 23:34:18 +02:00
Vitaly Baranov
000b184691 Fix style & compilation. 2022-04-25 23:05:35 +02:00
mergify[bot]
e79de5a577
Merge branch 'master' into optimize-asynchronous-metric-log 2022-04-25 17:29:11 +00:00
kssenii
a76a35d3ce Better drop cache 2022-04-25 19:20:25 +02:00
Vitaly Baranov
ed0af9d4a0 Improve shutdown with async backup/restore. 2022-04-25 16:34:34 +02:00
Vitaly Baranov
042dc4abb2 Rename settings shard -> shard_num, replica -> replica_num. 2022-04-25 16:34:34 +02:00
Vitaly Baranov
129eca7307 CREATE queries generated by RESTORE command is now considered as internal. 2022-04-25 16:34:34 +02:00
Vitaly Baranov
68a020ecea Implement BACKUP/RESTORE ON CLUSTER. 2022-04-25 16:34:33 +02:00
Vitaly Baranov
030f3e488c Add shard_index and replica_index to params of executeDDLQueryOnCluster(). 2022-04-25 16:34:33 +02:00
Vitaly Baranov
3477665659 Add shard_index and replica_index to params of getRewrittenASTWithoutOnCluster(). 2022-04-25 16:34:33 +02:00
Vitaly Baranov
144d3aefeb Add system table system.backups; implement async mode for commands BACKUP & RESTORE 2022-04-25 16:34:33 +02:00
Kseniia Sumarokova
2106a7b895
Merge pull request #36489 from awakeljw/fork_chmaster
fix ConvertDecimalType unexpected behavior
2022-04-25 13:23:54 +02:00
awakeljw
d58a21678a fix ConvertDecimalType unexpected behavior 2022-04-24 23:35:58 +08:00
Alexey Milovidov
90297e225c
Merge pull request #36430 from amosbird/fixcolumnmatcher
Fix column matcher and column transformer
2022-04-24 09:11:21 +03:00
Alexey Milovidov
fe004c3486
Merge pull request #36486 from kitaisreal/executable-user-defined-functions-fix-group-by
ExecutableUserDefinedFunction fix usage in GROUP BY
2022-04-24 06:11:57 +03:00
Alexey Milovidov
909646247d
Update TranslateQualifiedNamesVisitor.cpp 2022-04-24 05:04:13 +03:00
Nikita Mikhaylov
224f4dc620
Made parallel_reading_from_replicas work with localhost replica (#36281) 2022-04-22 15:52:38 +02:00
Maksim Kita
583cbcb834
Merge branch 'master' into fix_session_log_error_on_local_and_tcp_interserver_session 2022-04-21 21:15:11 +02:00
Maksim Kita
9713441650
Merge pull request #36480 from Joeywzr/session_log
add missing enum values in session_log
2022-04-21 21:14:12 +02:00
Maksim Kita
485c1d4072 Fixed tests 2022-04-21 19:10:11 +02:00
Maksim Kita
57444fc7d3
Merge pull request #36444 from rschu1ze/clang-tidy-fixes
Clang tidy fixes
2022-04-21 16:11:27 +02:00
Dmitry Novik
77a82cc090
Merge pull request #35631 from amosbird/projection-fix1
Fix broken SET reuse during projection analysis.
2022-04-21 15:32:52 +02:00
mergify[bot]
be6914f6f9
Merge branch 'master' into session_log 2022-04-21 11:52:20 +00:00
Maksim Kita
397603e9be ExecutableUserDefinedFunction fix usage in GROUP BY 2022-04-21 13:44:56 +02:00
Vasily Nemkov
e2866b0541 Fixed missing enum values for ClientInfo::Interface 2022-04-21 12:16:12 +03:00
Memo
ce91a261e8 add missing enum values in session_log 2022-04-21 17:01:44 +08:00
Alexey Milovidov
ec9b86fd03
Merge branch 'master' into fixcolumnmatcher 2022-04-21 02:15:25 +03:00
Azat Khuzhin
c6ffec1fec Fix "Cannot find column" error for distributed queries with LIMIT BY
Consider the following example:

    SELECT k FROM (SELECT materialize('foo') AS k, -1 AS v) ORDER BY abs(v) AS _v ASC LIMIT 1 BY k

The problem here is that in case of query has LIMIT BY for
WithMergeableState* (which is the final state on the remote shard for
distributd queries) it returns the following columns:
- k
- v

While it should return:
- k
- abs(v)

So as query w/o LIMIT BY, so that initiator will be able to do the sorting

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-20 15:23:24 +03:00
Robert Schulze
7550d9b281
Fix build 2022-04-20 13:34:17 +02:00
Robert Schulze
b24ca8de52
Fix various clang-tidy warnings
When I tried to add cool new clang-tidy 14 warnings, I noticed that the
current clang-tidy settings already produce a ton of warnings. This
commit addresses many of these. Almost all of them were non-critical,
i.e. C vs. C++ style casts.
2022-04-20 10:29:05 +02:00
Kseniia Sumarokova
766a84e64f
Merge pull request #35915 from kssenii/better-s3-settings
Better settings configuration for s3
2022-04-20 10:22:06 +02:00
Robert Schulze
b6d7367538
Merge remote-tracking branch 'origin/master' into erase_if3
Conflicts:
- Interpreters/ActionsDAG.cpp
2022-04-20 10:02:59 +02:00
Antonio Andelic
bbb0be6a44
Merge pull request #36402 from rschu1ze/clang-tidy-contains
Activate clang-tidy warning "readability-container-contains"
2022-04-20 08:15:46 +02:00
Kruglov Pavel
894b1b163e
Merge pull request #36055 from helifu/master2
Don't materialize external tables if it's explain statement
2022-04-19 20:26:27 +02:00