Commit Graph

12782 Commits

Author SHA1 Message Date
vdimir
6f3e9b6de2
Merge branch 'master' into vdimir/analyzer/comute_alias_columns 2024-03-05 13:08:58 +01:00
Robert Schulze
2c0b399c1f
Merge remote-tracking branch 'rschu1ze/master' into show-index-sorting 2024-03-05 11:27:32 +00:00
avogar
595c75ec53 Merge branch 'master' of github.com:ClickHouse/ClickHouse into max-parallel-replicas-validate 2024-03-05 11:19:04 +00:00
Kseniia Sumarokova
dbbe6b9f69
Merge branch 'master' into add-a-way-to-force-read-through-filesystem-cache-for-merges 2024-03-05 11:13:32 +08:00
Alexey Milovidov
8aeffa0356
Merge pull request #60765 from Avogar/fix-crash-in-input-join
Fix crash when using input() in INSERT SELECT JOIN
2024-03-05 04:32:50 +03:00
Nikolai Kochetov
819e7bfc77 Merge branch 'master' into refactor-system-one-block 2024-03-04 21:03:45 +00:00
Alexey Milovidov
a7430004b3 Fix real time query profiler on AArch64 2024-03-04 18:13:49 +01:00
Raúl Marín
96826ee8e1
Merge pull request #60362 from Algunenano/parallel_replicas_cte_2
Force reanalysis if parallel replicas changed
2024-03-04 17:16:17 +01:00
Alexey Milovidov
de6c5d3a40
Merge pull request #60552 from ClickHouse/pc2
Userspace page cache again
2024-03-04 17:47:35 +03:00
Dmitry Novik
f2387262ce Fix crash with different allow_experimental_analyzer value in subqueries 2024-03-04 15:32:15 +01:00
robot-ch-test-poll3
580f0f02d3
Merge pull request #60728 from ClickHouse/remove-old-code-5
Remove old code
2024-03-04 14:46:10 +01:00
Jordi Villar
1da1bbeae2 Set streams to 1 when using insert_deduplication_token 2024-03-04 14:35:57 +01:00
Dmitry Novik
01829450fb Merge remote-tracking branch 'origin/master' into analyzer-refactor-constant-name 2024-03-04 14:12:15 +01:00
avogar
ddf0dd7eb8 Fix crash when using input() in INSERT SELECT JOIN 2024-03-04 12:19:47 +00:00
Alexander Tokmakov
2e64b6722f
Revert "Synchronize parsers" 2024-03-04 11:42:21 +01:00
lgbo-ustc
aca219773b Merge remote-tracking branch 'origin/master' into hash_join_bug_59625 2024-03-04 10:51:26 +08:00
Alexey Milovidov
da2481c5c8 Merge remote-tracking branch 'origin/master' into remove-old-code-5 2024-03-04 00:12:03 +01:00
Alexey Milovidov
cbf5443585 Remove old code 2024-03-04 00:11:55 +01:00
Alexey Milovidov
fc7e66accb Fix build 2024-03-03 04:41:44 +01:00
Alexey Milovidov
6771e99d9f Merge branch 'master' into ddl_none_only_active 2024-03-03 03:09:24 +01:00
Yakov Olkhovskiy
3825cb3ad0 expand CTE in alter modify query 2024-03-02 15:28:45 +00:00
Nikita Taranov
4735eb3ab4 wait for pool jobs in case of exception on scheduling 2024-03-02 00:02:00 +01:00
Anton Popov
1b9e6c936e better interfaces for virtual columns 2024-03-01 22:29:56 +00:00
Nikita Taranov
bcd3ad01de
Merge pull request #55809 from amosbird/alt-51399
Improve the performance of serialized aggregation method when involving multiple [nullable] columns
2024-03-01 22:44:56 +01:00
Anton Popov
95611889dc fix tests 2024-03-01 18:44:33 +00:00
vdimir
47aa33408b
Resubmit "Analyzer: compute ALIAS columns right after reading"
This reverts commit 8141e1c3d1, reversing
changes made to fb099bbd62.
2024-03-01 14:53:02 +00:00
Raúl Marín
0dcaf3f2bb Merge remote-tracking branch 'blessed/master' into parallel_replicas_cte_2 2024-03-01 15:50:58 +01:00
Nikita Mikhaylov
4fd64a696b
Merge pull request #56942 from shabroo/master
Emit a warning in clickhouse-client if Ordinary database engine is used
2024-03-01 15:42:28 +01:00
Nikolai Kochetov
af5dae58ca Merge branch 'master' into refactor-system-one-block 2024-03-01 13:42:00 +00:00
Nikolai Kochetov
9211495fed Merge branch 'master' into constant-folding-scalar-subqueries 2024-03-01 12:06:26 +00:00
Raúl Marín
77752a63c7 Merge remote-tracking branch 'blessed/master' into parallel_replicas_cte_2 2024-03-01 12:48:23 +01:00
Robert Schulze
0231422ce7
Merge remote-tracking branch 'rschu1ze/master' into show-index-sorting 2024-03-01 11:41:21 +00:00
Robert Schulze
6d89455525
Merge pull request #60523 from rschu1ze/clang-tidy-src
Fix a bunch of clang-tidy warnings in headers
2024-03-01 12:37:48 +01:00
Robert Schulze
3a5c9b627b
Merge remote-tracking branch 'rschu1ze/master' into clang-tidy-src 2024-03-01 10:31:55 +00:00
Robert Schulze
dade55fc19
Merge remote-tracking branch 'ClickHouse/master' into query_cache_minor_change 2024-03-01 10:02:53 +00:00
Kseniia Sumarokova
5ac53c9578
Merge branch 'master' into add-a-way-to-force-read-through-filesystem-cache-for-merges 2024-03-01 11:05:47 +08:00
Anton Popov
caf50f4ea1 fix test 2024-02-29 21:09:12 +00:00
Julia Kartseva
891689a415
Merge pull request #60196 from azat/preliminary-filters-fix
Fix actions execution during preliminary filtering (PK, partition pruning)
2024-02-29 10:17:05 -08:00
Anton Popov
8a4e15536b refactoring of virtual columns 2024-02-29 18:01:54 +00:00
Raúl Marín
b7c884660a Merge remote-tracking branch 'blessed/master' into parallel_replicas_cte_2 2024-02-29 17:51:29 +01:00
Robert Schulze
6e5d6ad1c6
Merge remote-tracking branch 'ClickHouse/master' into query_cache_minor_change 2024-02-29 16:00:25 +00:00
Robert Schulze
be47036e3a
Merge remote-tracking branch 'rschu1ze/master' into show-index-sorting 2024-02-29 15:58:18 +00:00
Robert Schulze
4ee1aa8c7c
Fixing more headers 2024-02-29 15:40:30 +00:00
Yarik Briukhovetskyi
38bf7cfb59
Merge pull request #60004 from yariks5s/fix_datetime64_scale_conversion
Fix scale conversion for DateTime64
2024-02-29 15:45:54 +01:00
Amos Bird
3b04f5c605
Improve the performance of serialized aggregation method when involving multiple [nullable] columns. 2024-02-29 21:48:15 +08:00
Michael Kolupaev
cc893ad33c Merge remote-tracking branch 'origin/master' into pc2 2024-02-29 13:30:04 +00:00
Alexander Tokmakov
2dedfd6cf9
Revert "Analyzer: compute ALIAS columns right after reading" 2024-02-29 14:22:07 +01:00
Raúl Marín
f1132cfa1a Merge remote-tracking branch 'blessed/master' into parallel_replicas_cte_2 2024-02-29 14:11:46 +01:00
Nikita Mikhaylov
225775f499 Merge branch 'master' of github.com:ClickHouse/ClickHouse into shabroo/master 2024-02-29 13:06:20 +00:00
Robert Schulze
ed655815fe
Merge remote-tracking branch 'rschu1ze/master' into clang-tidy-src 2024-02-29 12:58:53 +00:00
serxa
5de16e4987 Merge branch 'master' into fix-db-shutdown-with-async-loader 2024-02-29 12:41:59 +00:00
Michael Kolupaev
42437a2ae1 Userspace page cache (#53770)
* Userspace page cache

* Maybe it'll build this time, who knows.

* 'auto' went out of fashion, I guess

* Documentation, tsan workaround, metric 'UnreclaimableRss', disable page cache in the test that uses DatabaseOrdinary

* Moved CachedInMemoryReadBufferFromFile to object store level, changed settings, addressed other comments.

* Fix

* Another fix

* Fix restricted seek, fix ppc64le build

* Don't allow page cache with file cache

* Adjust tests a little

* Fix clang-tidy

* Conflicts

* Comments

* Maybe unbroke AsynchronousBoundedReadBuffer

* SettingsChangesHistory.h

* Fix warning in test
2024-02-29 12:28:32 +00:00
Alexander Tokmakov
15e1191f74
Revert "Userspace page cache (#53770)"
This reverts commit 7b55c61551.
2024-02-29 13:20:17 +01:00
Robert Schulze
936c6bf5ae
Merge remote-tracking branch 'ClickHouse/master' into query_cache_minor_change 2024-02-29 11:30:05 +00:00
Robert Schulze
b7f1cb595e
Merge remote-tracking branch 'rschu1ze/master' into show-index-sorting 2024-02-29 11:28:29 +00:00
Michael Kolupaev
7b55c61551
Userspace page cache (#53770)
* Userspace page cache

* Maybe it'll build this time, who knows.

* 'auto' went out of fashion, I guess

* Documentation, tsan workaround, metric 'UnreclaimableRss', disable page cache in the test that uses DatabaseOrdinary

* Moved CachedInMemoryReadBufferFromFile to object store level, changed settings, addressed other comments.

* Fix

* Another fix

* Fix restricted seek, fix ppc64le build

* Don't allow page cache with file cache

* Adjust tests a little

* Fix clang-tidy

* Conflicts

* Comments

* Maybe unbroke AsynchronousBoundedReadBuffer

* SettingsChangesHistory.h

* Fix warning in test
2024-02-29 11:27:32 +00:00
vdimir
5dd81f38fb
Merge pull request #59595 from ClickHouse/vdimir/analyzer/comute_alias_columns
Analyzer: compute ALIAS columns right after reading
2024-02-29 10:28:31 +01:00
Alexey Milovidov
7c0ee5a783
Merge pull request #60198 from Avogar/variant-improvements
Fixes and improvements for Variant type
2024-02-29 03:27:22 +03:00
Robert Schulze
a1c164a758
Fix a bunch of clang-tidy warnings in headers 2024-02-28 23:43:12 +00:00
Alexey Milovidov
e1e66dc2b8
Merge pull request #60095 from ClickHouse/fix-inconsistent-formatting
Fix inconsistent formatting of queries
2024-02-29 00:41:40 +03:00
Nikita Mikhaylov
938976d8c3 Merge branch 'master' of github.com:ClickHouse/ClickHouse into shabroo/master 2024-02-28 21:40:43 +00:00
Robert Schulze
2ccaf954f6
Fix wacky primary key sorting in SHOW INDEX 2024-02-28 20:46:37 +00:00
Anton Popov
0ceeb13b7f refactoring of virtual columns 2024-02-28 19:58:55 +00:00
Robert Schulze
a58869303f
Added comment 2024-02-28 19:36:15 +00:00
Robert Schulze
d3b942cec5
Merge remote-tracking branch 'ClickHouse/master' into query_cache_minor_change 2024-02-28 19:35:31 +00:00
Nikolai Kochetov
53714e6f7a Refactor StorageSystemOneBlock 2024-02-28 19:10:00 +00:00
Raúl Marín
4023e67ac5
Merge pull request #60138 from Algunenano/max_threads_sanity
Add sanity check for number of threads and block size
2024-02-28 19:05:55 +01:00
Kruglov Pavel
a7eabbbe3a
Merge branch 'master' into variant-improvements 2024-02-28 17:38:54 +01:00
Alexey Milovidov
b0ab0b37db
Merge pull request #60434 from ClickHouse/revert-60216-revert-59697-check-stack-size-in-parser
Revert "Revert "Check stack size in Parser""
2024-02-28 19:20:49 +03:00
Alexey Milovidov
1950a75bd4 Merge branch 'master' into fix-inconsistent-formatting 2024-02-28 17:10:29 +01:00
Raúl Marín
2cea787f81 Merge remote-tracking branch 'blessed/master' into parallel_replicas_cte_2 2024-02-28 16:44:55 +01:00
Anton Popov
9f8ac76345 Merge remote-tracking branch 'upstream/master' into HEAD 2024-02-28 14:42:37 +00:00
Kruglov Pavel
f1b2dbaeb5
Merge pull request #60353 from Avogar/validate-nested-types-under-a-setting
Validate experimental and suspicious types inside nested types under a setting
2024-02-28 13:36:11 +01:00
avogar
929d83d46f Merge branch 'master' of github.com:ClickHouse/ClickHouse into max-parallel-replicas-validate 2024-02-28 12:31:46 +00:00
Raúl Marín
3920120260
Merge pull request #60453 from Algunenano/fix_preimagepass
Fix OptimizeDateOrDateTimeConverterWithPreimageVisitor with null arguments
2024-02-28 13:15:04 +01:00
pufit
330a206470
Add definers for views (Attempt 2) (#60439) 2024-02-27 19:00:17 -05:00
Nikita Taranov
90c9ae1b22
Merge pull request #59448 from nickitat/insert_with_max_insert_threads_into_remote_tables
More parallel insert-select pipeline
2024-02-28 00:54:16 +01:00
Alexey Milovidov
8cf619bc03 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-inconsistent-formatting 2024-02-28 00:30:44 +01:00
Alexey Milovidov
9ea7ff231b
Merge pull request #60448 from ClickHouse/clang-19
Update to clang-19
2024-02-27 23:38:08 +03:00
Nikolai Kochetov
1b79c0a381 Fixing tests. 2024-02-27 19:42:49 +00:00
Nikolai Kochetov
dd458932c9 Try to avoid calculation of scalar subqueries for CREATE TABLE. 2024-02-27 17:46:13 +00:00
Alexey Milovidov
0f3c9963d1 Merge branch 'master' of github.com:ClickHouse/ClickHouse into revert-60216-revert-59697-check-stack-size-in-parser 2024-02-27 17:30:32 +01:00
Dmitry Novik
33ae650e6a Merge remote-tracking branch 'origin/master' into analyzer-refactor-constant-name 2024-02-27 16:35:28 +01:00
kssenii
ffd69e0e12 Move setting to merge-tree level 2024-02-27 23:22:04 +08:00
Raúl Marín
0a243c3c57 Fix 2024-02-27 16:17:48 +01:00
Robert Schulze
0f6bec7842
Merge pull request #59291 from azat/dist/config-settings
Support specifying settings for Distributed engine in config (like for MergeTree)
2024-02-27 16:10:51 +01:00
Raúl Marín
e81c2ede2a Add setting to control preimage optimization 2024-02-27 15:58:42 +01:00
Alexey Milovidov
7c6e28708b
Merge pull request #60370 from ClickHouse/remove-alter-live-view
Remove ALTER LIVE VIEW
2024-02-27 17:45:59 +03:00
Nikita Mikhaylov
8719a601fa
Merge pull request #60436 from nickitat/revert_56864
Revert "Merge pull request #56864 from ClickHouse/broken-projections-better-handling"
2024-02-27 15:25:15 +01:00
Alexey Milovidov
c192a448d0 Update to clang-19 2024-02-27 14:37:21 +01:00
Raúl Marín
753056eed7
Merge branch 'master' into parallel_replicas_cte_2 2024-02-27 14:06:02 +01:00
Nikolai Kochetov
63b4457991
Merge pull request #60360 from ClickHouse/follow-up-60082
Follow up #60082
2024-02-27 12:50:25 +01:00
Raúl Marín
c9dd6fe8d5
Set max_parallel_replicas to 1 when disabling 2024-02-27 12:35:14 +01:00
liuneng
c1df83a27f refactor code 2024-02-27 14:04:54 +08:00
Nikita Taranov
854f1b064b Revert "Merge pull request #56864 from ClickHouse/broken-projections-better-handling"
This reverts commit caaafbcedb, reversing
changes made to d45b248f96.
2024-02-27 00:13:28 +01:00
Alexey Milovidov
04fe5dc55c Merge branch 'master' into fix-inconsistent-formatting 2024-02-26 23:46:24 +01:00
Alexey Milovidov
0b90076a36
Revert "Revert "Check stack size in Parser"" 2024-02-27 01:34:50 +03:00
Robert Schulze
4794dc28f0
Merge remote-tracking branch 'ClickHouse/master' into dist/config-settings 2024-02-26 21:57:33 +00:00
avogar
ac4af6a4ad Don't allow to set max_parallel_replicas to 0 as it doesn't make sense 2024-02-26 19:58:49 +00:00
Alexey Milovidov
ad99bb95a3
Merge pull request #60388 from ClickHouse/remove-useless-method-2
Remove unused method
2024-02-26 21:05:37 +03:00
Alexey Milovidov
a3f1411679 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-inconsistent-formatting 2024-02-26 19:01:11 +01:00
Amos Bird
41388a7a53 Fix
(cherry picked from commit 1d22dd8f0d809f1cc6593d4164098f1b5463cc77)
2024-02-26 17:52:19 +00:00
Alexander Tokmakov
07e22dbe50 Merge branch 'master' into ddl_none_only_active 2024-02-26 17:53:11 +01:00
vdimir
5a9026f39b
Analyzer: compute ALIAS columns right after reading 2024-02-26 16:15:05 +00:00
Raúl Marín
eb0af49fd0 Merge remote-tracking branch 'blessed/master' into max_threads_sanity 2024-02-26 16:33:43 +01:00
Nikolai Kochetov
ce7cde64ec Small fix 2024-02-26 15:33:25 +00:00
Nikolai Kochetov
ed78c18eda Add a setting query_plan_optimize_prewhere. Use AST-based PREWHERE optimization when it is disabled. 2024-02-26 15:19:27 +00:00
Nikolai Kochetov
2b9889fb84
Merge pull request #60082 from amosbird/non-trivial-count-optimization
Refactor prewhere and primary key optimization
2024-02-26 16:17:24 +01:00
Dmitry Novik
42b91201a5 Merge remote-tracking branch 'origin/master' into analyzer-refactor-constant-name 2024-02-26 15:11:57 +00:00
avogar
3c881b63d6 Merge branch 'master' of github.com:ClickHouse/ClickHouse into validate-nested-types-under-a-setting 2024-02-26 14:45:57 +00:00
Nikolai Kochetov
ef8dab52c6
Merge pull request #57767 from jsc0218/DictShortCircuit
Dict Short Circuit
2024-02-26 15:16:15 +01:00
Raúl Marín
f885423a4a Cleanup and more tests 2024-02-26 15:09:05 +01:00
Raúl Marín
2fa04bb37c Merge remote-tracking branch 'blessed/master' into parallel_replicas_cte_2 2024-02-26 14:31:20 +01:00
Yong Wang
795c1a98dc
Fix segmentation fault in KQL parser when the input query exceeds the max_query_size (#59626)
* Fix_kql_issue_found_by_wingfuzz

This commit fix the issues:
 https://github.com/ClickHouse/ClickHouse/issues/59036
 https://github.com/ClickHouse/ClickHouse/issues/59037

both issues are same reason, the input query exceed the max_query_size,
so the condition isEnd() of token is not meet and cause the assertion failure

* fix_kql_issue_found_by_wingfuzz: use isValid instead of TokenType::EndOfStream

* fix_kql_issue_found_by_wingfuzz: make functional test result consist

* fix_kql_issue_found_by_wingfuzz: update test case for makeseries

* fix_kql_issue_found_by_wingfuzz: disable makeseries

* fix_kql_issue_found_by_wingfuzz:
 use isvalid() function to replace isEnd() function of TokenIterator to check the end of stream

* fix_kql_issue_found_by_wingfuzz: add test case for max_query_size

* fix_kql_issue_found_by_wingfuzz: fix AST structure

* fix_kql_issue_found_by_wingfuzz: make sure the max query size test is in the dialect of kusto

* fix_kql_issue_found_by_wingfuzz : restore max query size after test

* fix_kql_issue_found_by_wingfuzz : fix typo

---------

Co-authored-by: János Benjamin Antal <benjamin.antal@clickhouse.com>
2024-02-26 13:31:47 +01:00
Yarik Briukhovetskyi
7d413bef18
Merge branch 'ClickHouse:master' into fix_datetime64_scale_conversion 2024-02-26 12:28:36 +01:00
Robert Schulze
1e40b63cb1
Merge remote-tracking branch 'ClickHouse/master' into dist/config-settings 2024-02-26 11:15:51 +00:00
Raúl Marín
f84209be2f Merge remote-tracking branch 'blessed/master' into max_threads_sanity 2024-02-26 11:56:29 +01:00
Robert Schulze
5c967c44de
Merge pull request #60248 from ClickHouse/revert-59450-order-by-all-ambiguities
Revert "Replace `ORDER BY ALL` by `ORDER BY *`"
2024-02-26 10:23:41 +01:00
liuneng
757b2f3369 fix style 2024-02-26 16:49:15 +08:00
liuneng
a0f108ec3f fix bug 2024-02-26 16:22:47 +08:00
liuneng
94f78ac44b use template class 2024-02-26 15:34:56 +08:00
kssenii
18741f122e Move a setting to server setting 2024-02-26 12:45:24 +08:00
liuneng
2279885c3e fix clangtidy error 2024-02-26 09:51:21 +08:00
liuneng
22a33884c3 fix bug 2024-02-26 09:51:21 +08:00
liuneng
ce3f95f717 fix style 2024-02-26 09:51:21 +08:00
liuneng
b0943ab3e8 add lazyAddedColumns 2024-02-26 09:51:21 +08:00
liuneng
3a2c9a8793 update 2024-02-26 09:51:21 +08:00
liuneng
5c42f2c041 optimize default value 2024-02-26 09:51:21 +08:00
liuneng
18eb75f4d2 lazy build join output 2024-02-26 09:51:21 +08:00
Alexey Milovidov
979cd2937b Fix inconsistent formatting of SET param_... 2024-02-26 02:11:51 +01:00
Alexey Milovidov
10e59c2e01 Remove ALTER LIVE VIEW 2024-02-26 00:01:34 +01:00
Alexey Milovidov
d097da1223 Remove unused method 2024-02-25 22:40:03 +01:00
Amos Bird
534da3f40f
Fix more tests 2024-02-26 02:31:59 +08:00
Amos Bird
5551a9073b
Better 2024-02-26 02:31:59 +08:00
Amos Bird
207d36d7c1
Make it work 2024-02-26 02:31:58 +08:00
Amos Bird
6137914604
Fix most tests 2024-02-26 02:31:58 +08:00
Amos Bird
b40a412086
Fix 2024-02-26 02:31:57 +08:00
Amos Bird
8a1e23dcc4
Fix more tests 2024-02-26 02:31:57 +08:00
Amos Bird
7435568a0d
Fix tests 2024-02-26 02:31:57 +08:00
Amos Bird
c5e073320c
Unify prewhere optimization 2024-02-26 02:31:56 +08:00
Amos Bird
07a0adceb9
Only use query_info.filter_actions_dag for key analysis 2024-02-26 02:31:55 +08:00
Alexey Milovidov
2eb4d25126 Remove ALTER LIVE VIEW 2024-02-23 22:56:18 +01:00
avogar
8fa75a21c5 Don't allow suspicious variant types by default, add notes in documentation 2024-02-23 20:48:38 +00:00
avogar
39ad054e94 Merge branch 'master' of github.com:ClickHouse/ClickHouse into variant-improvements 2024-02-23 18:59:34 +00:00
Raúl Marín
d507884a1d Force reanalysis if parallel replicas changed 2024-02-23 17:59:25 +01:00
Alexey Milovidov
da2ae34c1d Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-inconsistent-formatting 2024-02-23 15:55:03 +01:00
Alexey Milovidov
10ba0801be Fix inconsistent formatting of SYSTEM SYNC REPLICA LIGHTWEIGHT 2024-02-23 15:45:08 +01:00
Nikita Mikhaylov
8fef0b71c4
Merge pull request #60350 from ClickHouse/revert-54901-pufit/views-sql-security
Revert "Add definers for views"
2024-02-23 15:15:36 +01:00
Alexey Milovidov
9e32d0f5b2 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-inconsistent-formatting 2024-02-23 15:05:46 +01:00
avogar
da8d8fee47 Validate experimental and suspicious types inside nested types under a setting to reflect it in compatibility setting 2024-02-23 13:45:03 +00:00
Dmitry Novik
d13b2a91c1 Fix virtual tables 2024-02-23 13:33:12 +00:00
Raúl Marín
edd5a64890 Better checks 2024-02-23 14:22:05 +01:00
Alexander Tokmakov
32607cc796
Merge pull request #60159 from ClickHouse/fix_create_replica
Skip sanity checks on secondary CREATE query
2024-02-23 13:53:47 +01:00
Alexander Tokmakov
011c694117 add none_only_active DDL output mode 2024-02-23 13:10:01 +01:00
Sergei Trifonov
2c766cf75f
Merge pull request #59507 from ClickHouse/alter-table-forget-partition
Add `FORGET PARTITION` query to remove old partition nodes from ZooKeeper
2024-02-23 12:55:08 +01:00
Raúl Marín
464b5e0e15
Revert "Add definers for views (#54901)"
This reverts commit 57306706b3.
2024-02-23 12:44:31 +01:00
Vitaly Baranov
db119eed49
Merge pull request #60002 from vitlibar/add-config-setting-remove-backup-files-after-failure
Add new config setting "backups.remove_backup_files_after_failure"
2024-02-23 12:42:55 +01:00
Raúl Marín
a431608dd4 Add sanity check for some settings 2024-02-23 12:32:17 +01:00
Yarik Briukhovetskyi
ec2c717910
Merge branch 'ClickHouse:master' into fix_datetime64_scale_conversion 2024-02-23 12:24:14 +01:00
zhongyuankai
055efec1a0
minor 2024-02-23 19:03:41 +08:00
zhongyuankai
68239075b7
Query cache does not record the number of queries by default 2024-02-23 18:33:24 +08:00
Raúl Marín
1a4b4d493f
Merge pull request #60228 from Algunenano/parallel_replicas_2
Treat 2+ in allow_experimental_parallel_reading_from_replicas as 2
2024-02-23 11:17:23 +01:00
János Benjamin Antal
7cad0050c0
Disambiguate alter commands list (#59532)
* Add optional parentheses to TTL element and alter command

* Add some basic tests

* Extend tests with more test cases

* Add one more test case

* Add server setting to control new formatting behavior

* Automatic style fix

* Fix segfault in `clickhouse-format` related to new server setting

* Remove format_ttl_expressions_with_parentheses

* Fix unit test compilation failures

* Introduce global flag to control the new formatting behavior

* Revert "Fix segfault in `clickhouse-format` related to new server setting"

This reverts commit d7131a3145.

* Revert accidental changes

* Revert accidental include reorder

* Revert accidental changes

* Enable new format in client and local server

---------

Co-authored-by: robot-clickhouse <robot-clickhouse@users.noreply.github.com>
2024-02-22 19:17:15 +01:00
Alexander Tokmakov
e56748a92c
Merge pull request #60044 from ClickHouse/fix_undead_sessions
Ability to detect undead ZooKeeper sessions
2024-02-22 18:13:15 +01:00
Vitaly Baranov
b130726a0c
Merge branch 'master' into add-config-setting-remove-backup-files-after-failure 2024-02-22 18:09:12 +01:00
serxa
9cb1ade3e2 fix db iterator wait 2024-02-22 17:07:47 +00:00
pufit
57306706b3
Add definers for views (#54901) 2024-02-22 17:47:50 +01:00
kssenii
f1e95fb78b Add a way to force read-through cache for merges 2024-02-22 15:40:00 +01:00
Azat Khuzhin
0cb6f205d7 Fix actions execution during preliminary filtering (PK, partition pruning)
Previously preliminary filtering works incorrectly if input columns had
been used multiple times, because:
- position initialized only for the first user
- column had been moved, so the second user will get nullptr

And this was the case when it had been required multiple times.

Consider the following example:

    select * from data final prewhere indexHint(_partition_id = 'all') or indexHint(_partition_id = 'all')

Actions for this PREWHERE is the following:

    (lldb) p actions.__ptr_->dumpActions()
    (std::string) $1 = "input:
    _partition_id LowCardinality(String)
    _partition_id LowCardinality(String)

    actions:
    INPUT : 0 -> _partition_id LowCardinality(String) : 0
    COLUMN Const(String) -> 'all' String : 1
    COLUMN Const(String) -> 'UInt8'_String String : 2
    INPUT : 1 -> _partition_id LowCardinality(String) : 3
    COLUMN Const(String) -> 'all' String : 4
    COLUMN Const(String) -> 'UInt8'_String String : 5
    FUNCTION equals(_partition_id :: 0, 'all' :: 1) -> equals(_partition_id, 'all') LowCardinality(UInt8) : 6
    FUNCTION equals(_partition_id :: 3, 'all' :: 4) -> equals(_partition_id, 'all') LowCardinality(UInt8) : 1
    FUNCTION _CAST(equals(_partition_id, 'all') :: 6, 'UInt8'_String :: 2) -> _CAST(equals(_partition_id, 'all'), 'UInt8'_String) UInt8 : 4
    FUNCTION _CAST(equals(_partition_id, 'all') :: 1, 'UInt8'_String :: 5) -> _CAST(equals(_partition_id, 'all'), 'UInt8'_String) UInt8 : 2
    FUNCTION or(_CAST(equals(_partition_id, 'all'), 'UInt8'_String) :: 4, _CAST(equals(_partition_id, 'all'), 'UInt8'_String) :: 2) -> or(indexHint(), indexHint())"...

It has _partition_id column in input multiple times.

So fix this by adding a flag (`allow_duplicates_in_input`), if set,
columns will be fully initialized.

v2: fix "Position out of bound in Block::erase()"
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-02-22 15:01:57 +01:00
Azat Khuzhin
be2ec93a3f Remove commented code in ExpressionActions::execute()
This information will be added to the exception anyway.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-02-22 15:01:57 +01:00
Alexander Tokmakov
97ed2c05b0 Merge branch 'master' into fix_undead_sessions 2024-02-22 14:36:36 +01:00
Yarik Briukhovetskyi
ab634a308d
Merge branch 'ClickHouse:master' into fix_datetime64_scale_conversion 2024-02-22 13:22:04 +01:00
Nikolai Kochetov
0e6b55ad35
Merge pull request #60220 from kitaisreal/system-backups-system-backup-log-add-query-id-and-error-stacktrace
Tables system.backups and system.backup_log add query_id and error stacktrace
2024-02-22 12:43:52 +01:00
lgbo-ustc
501e05fda1 fixed: improber filter setting 2024-02-22 09:22:28 +08:00
Alexey Milovidov
5b086744f2 Crash 2024-02-21 21:39:58 +01:00
Robert Schulze
7930c2a993
Better! 2024-02-21 20:31:49 +00:00
Alexey Milovidov
2d9fbaa859 Merge with master 2024-02-21 20:37:48 +01:00
Robert Schulze
52afa46e23
Revert "Replace ORDER BY ALL by ORDER BY *" 2024-02-21 19:05:20 +01:00
Nikita Mikhaylov
8d47e5ad14 Merge branch 'master' of github.com:ClickHouse/ClickHouse into shabroo/master 2024-02-21 17:56:02 +00:00
Alexey Milovidov
659d30774d Fix MODIFY REFRESH formatting 2024-02-21 18:37:46 +01:00
Raúl Marín
b71bdbae1b Treat 2+ in allow_experimental_parallel_reading_from_replicas as 2 2024-02-21 15:33:37 +01:00
Kruglov Pavel
10535132c3
Merge pull request #59385 from Avogar/fix-bad-types-check
Fix validating suspicious/experimental types in nested types
2024-02-21 14:38:01 +01:00
avogar
bd2390996e Merge branch 'master' of github.com:ClickHouse/ClickHouse into variant-improvements 2024-02-21 13:16:07 +01:00
Maksim Kita
ae91c655a0 Tables system.backups and system.backup_log add query_id and error stacktrace 2024-02-21 14:36:58 +03:00
Antonio Andelic
fee1565780
Revert "Check stack size in Parser" 2024-02-21 11:33:08 +01:00
Kseniia Sumarokova
d601534a4e
Merge pull request #60166 from ClickHouse/fix-s3-queue-system-table-uuid-column
Fix system.s3queue_log
2024-02-21 10:52:45 +01:00
Alexey Milovidov
41701ce39d Fix error 2024-02-21 08:20:29 +01:00
Alexey Milovidov
71c267e0b0 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-inconsistent-formatting 2024-02-21 07:56:51 +01:00
Anton Popov
23f300b581 refactoring of virtual columns 2024-02-21 00:57:35 +00:00
Alexander Tokmakov
45d407034f Merge branch 'master' into fix_undead_sessions 2024-02-20 22:21:37 +01:00
Alexander Tokmakov
ec0986af0b skip sanity checks on secondary create query 2024-02-20 21:59:28 +01:00
Yarik Briukhovetskyi
c722ebfaa0
Merge branch 'ClickHouse:master' into fix_datetime64_scale_conversion 2024-02-20 20:22:56 +01:00
avogar
122dc6769d Fixes and improvements for Variant type 2024-02-20 18:58:06 +00:00
Robert Schulze
914b19aade
Merge pull request #59450 from rschu1ze/order-by-all-ambiguities
Replace `ORDER BY ALL` by `ORDER BY *`
2024-02-20 18:16:22 +01:00
Robert Schulze
a1a45ed881
Merge pull request #60160 from rschu1ze/bool-cast
Allow casting of bools in string representation to to true bools
2024-02-20 17:19:02 +01:00
Sergei Trifonov
d2aebe2c9a
Merge branch 'master' into alter-table-forget-partition 2024-02-20 13:56:50 +01:00
Alexey Milovidov
15f5e47f44 Fix build 2024-02-20 12:18:45 +01:00
Alexey Milovidov
96598f8553 Fix build 2024-02-20 11:56:17 +01:00
Alexey Milovidov
38ae6968b6 Fix build 2024-02-20 11:45:42 +01:00
kssenii
3dac4c9743 Fix 2024-02-20 11:10:11 +01:00