Commit Graph

9125 Commits

Author SHA1 Message Date
Geoff Genz
99c3ff53c5 Merge remote-tracking branch 'origin/master' into http_client_version
# Conflicts:
#	src/Interpreters/Context.cpp
#	src/Interpreters/Context.h
2023-02-10 04:35:53 -07:00
Geoff Genz
7ed8ed0284 Add support for client_protocol_version sent with HTTP 2023-02-10 03:47:06 -07:00
KitKatKKK
ea300ce13b
Merge branch 'master' into addParts 2023-02-10 16:48:04 +08:00
attack204
93e92dab3b rename API 2023-02-10 16:05:50 +08:00
taiyang-li
5c1425b322 Merge branch 'rewrite_array_exists' of https://github.com/bigo-sg/ClickHouse into rewrite_array_exists 2023-02-10 11:32:56 +08:00
taiyang-li
58c348fecd fix build error 2023-02-10 11:27:10 +08:00
serxa
a4006ec5a1 add explanation 2023-02-09 19:49:11 +00:00
serxa
bf299b6696 Merge branch 'round-robin-merge-scheduler' of github.com:ClickHouse/ClickHouse into round-robin-merge-scheduler 2023-02-09 19:33:17 +00:00
serxa
cc3c76944b remove redundant code 2023-02-09 19:31:54 +00:00
Sergei Trifonov
e3727d9b0e
Merge branch 'master' into round-robin-merge-scheduler 2023-02-09 20:04:59 +01:00
serxa
f61f95fcec Replace background executor scheduler merges and mutations with round-robin 2023-02-09 18:54:15 +00:00
Robert Schulze
566fb5b9da
Merge pull request #46006 from ClickHouse/rs/fix-fragile-linking
Fix terribly broken, fragile and potentially cyclic linking
2023-02-09 18:19:44 +01:00
李扬
b9c942e2e7
Merge branch 'master' into rewrite_array_exists 2023-02-09 21:47:38 +08:00
Vitaly Baranov
39bacfb9dc
Merge branch 'master' into allow-single-disk-instead-of-storage-policy 2023-02-09 13:16:55 +01:00
avogar
01c42dd6f3 Fix 2023-02-09 12:03:56 +00:00
alesapin
859f528fe1
Merge pull request #45648 from ClickHouse/45508_Update_strategy_for_system_sync_replica
Updated checking of SYSTEM SYNC REPLICA
2023-02-09 11:51:05 +01:00
Robert Schulze
e490ec91d9
Merge branch 'master' into rs/fix-fragile-linking 2023-02-09 11:33:59 +01:00
taiyang-li
e1fed0352e remove useless code 2023-02-09 16:32:11 +08:00
taiyang-li
19ca0ec4af add passes for rewriting arrayexists 2023-02-09 16:30:53 +08:00
taiyang-li
af7a6abf80 fix bugs 2023-02-09 15:15:08 +08:00
taiyang-li
1ce12c8ab5 add visitor files 2023-02-09 12:26:32 +08:00
taiyang-li
48f0fb0d52 rewrite array exists to has 2023-02-09 12:06:42 +08:00
Alexey Milovidov
292a5abbc9 Merge remote-tracking branch 'origin/master' into with-fill-bigint 2023-02-09 01:47:51 +01:00
Vitaly Baranov
4869d3806c Add setting check_referential_table_dependencies to check referential dependencies on DROP TABLE. 2023-02-08 23:56:59 +01:00
kssenii
b0b865c32e Resubmit prefetches 2023-02-08 21:26:24 +01:00
avogar
85dd330374 Add test, fix low cardinality again 2023-02-08 19:24:04 +00:00
avogar
c3e8dd8984 Fix low cardinality case 2023-02-08 19:14:28 +00:00
avogar
738311c7fa Use default of columnt type in insert_null_as_default if column DEFAULT values is not specified 2023-02-08 15:48:18 +00:00
Alexander Gololobov
a7c30eecf4
Merge pull request #46141 from ClickHouse/fix-assertion-in-statistics
Fix assertion in statistical functions
2023-02-08 13:42:02 +01:00
Robert Schulze
6ff232d782
Merge branch 'master' into rs/fix-fragile-linking 2023-02-08 12:51:12 +01:00
Kruglov Pavel
8bdb1c3453
Merge pull request #44728 from bigo-sg/improve_count_if
Improve count if rewrite
2023-02-08 12:21:29 +01:00
Alexey Milovidov
a9ec73a209 Fix strange trash 2023-02-08 08:26:27 +01:00
Alexey Milovidov
55c3bbb739 Fix assertion in statistical functions 2023-02-08 00:09:41 +01:00
kssenii
5c201698f4 Fix changes in commit c4be868222 2023-02-07 16:50:55 +01:00
Roman Vasin
2b300e06d0 Fix setEngine() for temporary tables 2023-02-07 14:24:47 +00:00
Yakov Olkhovskiy
4e7dffafe4
Merge pull request #46087 from ClickHouse/fix-ip-bloom
Allow bloom filter for IPv4 and IPv6
2023-02-07 08:29:28 -05:00
Yakov Olkhovskiy
909a772701
Merge pull request #45375 from ClibMouse/window_view_fix
Window view functional test failed on platform s390x
2023-02-07 08:23:50 -05:00
Robert Schulze
08c1f8346e
Merge remote-tracking branch 'origin/master' into rs/fix-fragile-linking 2023-02-07 11:22:00 +00:00
Vitaly Baranov
f021c0eab6
Merge pull request #46058 from vitlibar/remove-unnecessary-execute-for-const-expr
Remove unnecessary execute() while evaluating a constant expression.
2023-02-07 12:09:37 +01:00
Roman Vasin
9488bd834f
Merge branch 'master' into ADQM-639 2023-02-07 09:45:10 +03:00
Yakov Olkhovskiy
e433c26cf9 allow bloom filter for IPv4 and IPv6 2023-02-06 16:30:18 +00:00
Suzy Wang
6edbffa3cc
Merge branch 'master' into window_view_fix 2023-02-06 10:06:04 -05:00
kssenii
ae9922abe5 Fix clang tidy 2023-02-06 13:17:21 +01:00
kssenii
fb348f8222 Merge remote-tracking branch 'origin/cache-better-locks' into cache-better-locks 2023-02-06 13:15:26 +01:00
kssenii
c4be868222 Fix delayed cleanup 2023-02-06 13:15:02 +01:00
alesapin
b94f9f8006
Merge branch 'master' into 45508_Update_strategy_for_system_sync_replica 2023-02-06 12:38:39 +01:00
Antonio Andelic
f67e5505ab Merge branch 'master' into custom-key-parallel-replicas 2023-02-06 11:12:39 +00:00
Robert Schulze
84b9ff450f
Fix terribly broken, fragile and potentially cyclic linking
Sorry for the clickbaity title. This is about static method
ConnectionTimeouts::getHTTPTimeouts(). It was be declared in header
IO/ConnectionTimeouts.h, and defined in header
IO/ConnectionTimeoutsContext.h (!). This is weird and caused issues with
linking on s390x (##45520). There was an attempt to fix some
inconsistencies (#45848) but neither did @Algunenano nor me at first
really understand why the definition is in the header.

Turns out that ConnectionTimeoutsContext.h is only #include'd from
source files which are part of the normal server build BUT NOT part of
the keeper standalone build (which must be enabled via CMake
-DBUILD_STANDALONE_KEEPER=1). This dependency was not documented and as
a result, some misguided workarounds were introduced earlier, e.g.
0341c6c54b

The deeper cause was that getHTTPTimeouts() is passed a "Context". This
class is part of the "dbms" libary which is deliberately not linked by
the standalone build of clickhouse-keeper. The context is only used to
read the settings and the "Settings" class is part of the
clickhouse_common library which is linked by clickhouse-keeper already.

To resolve this mess, this PR

- creates source file IO/ConnectionTimeouts.cpp and moves all
  ConnectionTimeouts definitions into it, including getHTTPTimeouts().

- breaks the wrong dependency by passing "Settings" instead of "Context"
  into getHTTPTimeouts().

- resolves the previous hacks
2023-02-05 20:49:34 +00:00
Vitaly Baranov
a3423ce196 Remove unnecessary execute() while evaluating a constant expression. 2023-02-05 20:26:34 +01:00
Robert Schulze
9b841d67e8
Merge remote-tracking branch 'origin/master' into qc-max_cache_size 2023-02-05 16:47:02 +00:00
Kseniia Sumarokova
80c96f7d3d
Merge branch 'master' into cache-better-locks 2023-02-04 22:31:59 +01:00
kssenii
5abbc7cad6 Cleanup 2023-02-04 19:41:41 +01:00
kssenii
1cbff88a7c Fix integration test 2023-02-04 19:31:19 +01:00
Nikita Taranov
b983b363f8 Merge branch 'master' into aggr_partitions_independently 2023-02-04 18:24:31 +00:00
kssenii
5f124263a6 Revert changes with complex SettingsChanges 2023-02-03 21:04:45 +01:00
Nikita Mikhaylov
33877b5e00
Parallel replicas. Part [2] (#43772) 2023-02-03 14:34:18 +01:00
Antonio Andelic
d5117f2aa6
Define S3 client with bucket and endpoint resolution (#45783)
* Update aws

* Define S3 client with bucket and endpoint resolution

* Add defines for ErrorCodes

* Use S3Client everywhere

* Remove unused errorcode

* Add DROP S3 CLIENT CACHE query

* Add a comment

* Fix style

* Update aws

* Update reference files

* Add missing include

* Fix unit test

* Remove unneeded declarations

* Correctly use RetryStrategy

* Rename S3Client to Client

* Fix retry count

* fix clang-tidy warnings
2023-02-03 14:30:52 +01:00
Arthur Passos
0f2b9612e3 revert old architecture visitor until I get it working if needed 2023-02-03 10:03:39 -03:00
Robert Schulze
f72286c8f3
Merge branch 'master' into qc-max_cache_size 2023-02-03 10:54:35 +01:00
Alexey Milovidov
108d1c3442
Merge pull request #45872 from ClickHouse/fix-trash-query-kind
Remove trash, add a feature and fix a bug
2023-02-03 09:58:43 +03:00
Alexey Milovidov
ebbc22bcf1 Fix error 2023-02-03 02:16:30 +01:00
kssenii
45a65e5a7b Merge remote-tracking branch 'origin/cache-better-locks' into cache-better-locks 2023-02-02 20:51:38 +01:00
kssenii
34be401ce2 Rename some variables 2023-02-02 20:50:37 +01:00
kssenii
a391de18a1 Merge remote-tracking branch 'upstream/master' into allow-single-disk-instead-of-storage-policy 2023-02-02 20:49:41 +01:00
Robert Schulze
b1889b0284
Make the naming a little less confusing 2023-02-02 19:18:39 +00:00
Robert Schulze
0e5a10b856
Merge pull request #45751 from ClickHouse/qc-better-logging
Improve logging in Query Cache
2023-02-02 20:11:18 +01:00
Suzy Wang
1619971b95
Merge branch 'master' into window_view_fix 2023-02-02 11:04:38 -05:00
Alexander Gololobov
ec3bb0c04e
Merge pull request #45794 from ClickHouse/parallelize_is_storage_touched_by_mutations
Do not restrict count() query to 1 thread in isStorageTouchedByMutations()
2023-02-02 16:44:11 +01:00
Kseniia Sumarokova
24da7f2b54
Merge branch 'master' into cache-better-locks 2023-02-02 16:07:13 +01:00
Robert Schulze
8055b7ed07
Merge branch 'master' into qc-better-logging 2023-02-02 11:45:37 +01:00
Robert Schulze
53e1c9cd08
Merge branch 'master' into qc-max_cache_size 2023-02-02 11:45:29 +01:00
kssenii
d9129a64f2 Remove duplicate file 2023-02-02 11:18:52 +01:00
Alexey Milovidov
62bfdb349a Merge branch 'master' into fix-trash-query-kind 2023-02-02 04:26:49 +01:00
Suzy Wang
5b3054492d
Update src/Interpreters/Aggregator.h
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
2023-02-01 15:21:34 -05:00
Arthur Passos
7e7b1829be temp 2023-02-01 14:29:59 -03:00
kssenii
a083178eec Fix style 2023-02-01 18:16:42 +01:00
kssenii
3075a496cb Refactoring 2023-02-01 17:12:14 +01:00
Dmitry Novik
eee7df8149 WIP on group_by_use_nulls 2023-02-01 13:33:32 +00:00
kssenii
6320a1c4e1 Fix stress tests 2023-02-01 14:28:47 +01:00
Vladimir C
0d48eed68f
Merge pull request #45848 from Algunenano/fix_connection_timeouts_context_include 2023-02-01 12:53:50 +01:00
Robert Schulze
216636f984
Make query cache global settings re-configurable 2023-02-01 10:35:19 +00:00
Robert Schulze
8a9493aeb9
Update QueryCache.cpp 2023-02-01 11:28:00 +01:00
Robert Schulze
f6259fbd65
Query cache: Improve logging 2023-02-01 10:24:17 +00:00
Robert Schulze
b512316586
Merge pull request #45682 from ClickHouse/rename-qrc-to-qc
Rename "Query Result Cache" to "Query Cache"
2023-02-01 11:23:29 +01:00
Alexander Gololobov
e705f11ad1
Merge pull request #45786 from ClickHouse/delete_on_cluster
Support DELETE ON CLUSTER
2023-02-01 10:52:01 +01:00
robot-ch-test-poll2
202fa9fa37
Merge pull request #45859 from FArthur-cmd/show_engines_support
Add support for SHOW ENGINES query
2023-02-01 07:32:56 +01:00
Alexey Milovidov
9b908a0be0 Fix trash around query kind, part 2 2023-02-01 03:31:31 +01:00
Alexey Milovidov
5c4db119fa Fix trash around query kind, part 1 2023-02-01 03:11:54 +01:00
Alexey Milovidov
c7f9cf6587
Update InterpreterShowEngineQuery.h 2023-02-01 04:57:58 +03:00
Arthur Passos
2c15ede37c Change setting name from force_select_final to final 2023-01-31 15:21:00 -03:00
kssenii
ad34ff24dc Fix memory leak 2023-01-31 16:41:43 +01:00
FArthur-cmd
a8e38738e9 add support for show engines query 2023-01-31 18:35:10 +03:00
Raúl Marín
7c31cb7adc Proper includes for ConnectionTimeoutsContext.h 2023-01-31 16:11:32 +01:00
Alexander Gololobov
96cb23a6a1 Break on first non-empty block 2023-01-31 15:49:56 +01:00
kssenii
f497e3bcbe Better 2023-01-31 14:48:51 +01:00
Arthur Passos
f194b452e7 auto -> bool 2023-01-31 09:13:57 -03:00
Antonio Andelic
c99efa75b7
Merge branch 'master' into custom-key-parallel-replicas 2023-01-31 11:58:30 +01:00
Robert Schulze
325c6bdf3d
Renaming: "Query Result Cache" --> "Query Cache"
Reasons:

- The cache will at some point store intermediate results as opposed to
  only query results. We should change the terminology now without
  having to worry about backward compat.

- Equivalent caches in MySQL (1) and Starrocks (2) are called "query
  cache".

- The new name is ca. 13.8% more catchy.

(1) https://dev.mysql.com/doc/refman/5.6/en/query-cache.html
(2) https://docs.starrocks.io/en-us/2.5/using_starrocks/query_cache
2023-01-31 09:54:34 +00:00
Robert Schulze
659a64a1d9
Merge pull request #45679 from ClickHouse/untangle-query-result-cache-settings
Untangle configuration of query result cache
2023-01-31 10:44:14 +01:00
Alexander Gololobov
93b82a2c44 Use multithreaded executor in isStorageTouchedByMutations() 2023-01-30 23:48:52 +01:00
Alexander Gololobov
4eea3de654 Do not restrict count() query to 1 thread in isStorageTouchedByMutations() 2023-01-30 22:29:28 +01:00
Alexander Gololobov
863548114d force_wait flag is no longer needed 2023-01-30 18:38:28 +01:00
Nikita Taranov
3e3d1d15a8 properly handle case when there is nondeterministic functions 2023-01-30 17:11:56 +00:00
Nikita Taranov
581f31ad3d better 2023-01-30 17:11:56 +00:00
Nikita Taranov
a18343773f improve perf 2023-01-30 17:11:56 +00:00
Nikita Taranov
a2c9aeb7c9 stash 2023-01-30 17:10:45 +00:00
Arthur Passos
48e5211454
Merge branch 'ClickHouse:master' into add_select_final_mt_setting 2023-01-30 13:01:36 -03:00
Alexander Gololobov
de841b29c7 Support delete ON CLUSTER 2023-01-30 16:42:52 +01:00
Alexander Gololobov
386ae9266d Rewrite DELETE into ALTER UPDATE _row_exists=0 2023-01-30 15:46:17 +01:00
Robert Schulze
27b978381b
Use more speaking setting names 2023-01-30 14:20:43 +00:00
kssenii
0378edc3fe Better test 2023-01-30 15:19:09 +01:00
Roman Vasin
df4a9f111c Disallow creation of temporary tables with ON CLUSTER and with Repliacted table engines 2023-01-30 08:08:20 +00:00
SmitaRKulkarni
809354dc30
Merge branch 'master' into 45508_Update_strategy_for_system_sync_replica 2023-01-29 11:28:21 +01:00
taiyang-li
3ee792f4e2 Merge branch 'master' into improve_count_if 2023-01-29 15:46:23 +08:00
Alexey Milovidov
f4eb19bd69
Update InterpreterSystemQuery.cpp 2023-01-29 04:43:24 +03:00
freedomDR
379850b6c4 add system sync file cache 2023-01-28 04:27:10 +00:00
kssenii
a05054e10e Fix 2023-01-27 17:05:01 +01:00
SmitaRKulkarni
b22fd40d92
Merge branch 'master' into 45508_Update_strategy_for_system_sync_replica 2023-01-27 15:00:47 +01:00
kssenii
dc3cff9f06 Merge remote-tracking branch 'upstream/master' into cache-better-locks 2023-01-27 12:39:23 +01:00
Robert Schulze
e30c38cab3
Fix up some leftovers 2023-01-27 10:43:43 +00:00
Robert Schulze
7d97fab2dc
Untangle query result cache settings
This PR modularizes the configuration options of the query result cache
(QRC).

1. Add a feature toggle "allow_experimental_query_result_cache = false"
   which controls whether the experimental QRC can be used at all. This
   configuration option will be removed once the QRC becomes
   non-experimental.

2. Modularize the existing two configuration settings
   "enable_experimental_query_result_cache" and
   "enable_experimental_query_result_cache_passive_usage" into three
   orthogonal settings:

   - "use_query_result_cache = false" controls whether a query (or all
     queries of the session) utilize the query result cache

   - settings "use_query_result_cache_passive_usage = true" and
     "use_query_result_cache_active_usage = true" control the way a
     query (or all queries of the session) utilize the query result
     cache: "passive" use is reading, "active" use is writing.
2023-01-26 21:17:48 +00:00
Alexander Tokmakov
067b1f5f13 Merge branch 'master' into exception_message_patterns4 2023-01-26 15:20:58 +01:00
Roman Vasin
c09d8e744f Make MergeTree and Log table engines DROP and clean data 2023-01-26 14:15:09 +00:00
Antonio Andelic
07b2c5ce0f
Merge branch 'master' into custom-key-parallel-replicas 2023-01-26 12:42:04 +01:00
Smita Kulkarni
8c885ffeae Updated checking of SYSTEM SYNC REPLICA
Implementation:
* Updated to wait for current last entry to be processed (after pulling shared log) instead of queue size becoming 0.
* Updated Subscriber to notify both queue size and removed log_entry_id.
2023-01-26 11:40:09 +01:00
Alexander Tokmakov
a584ad0eb1 forbid runtime strings 2023-01-26 10:52:47 +01:00
Kseniia Sumarokova
297516a084
Merge pull request #45614 from kssenii/rename-some-setting
Rename setting `max_query_cache_size`
2023-01-26 10:46:03 +01:00
Alexander Tokmakov
9b670946db Merge branch 'master' into exception_message_patterns5 2023-01-26 00:41:32 +01:00
Alexander Tokmakov
3744fa2c63 format more messages 2023-01-25 21:16:42 +01:00
kssenii
29de87e145 Rename setting 2023-01-25 16:36:36 +01:00
Alexander Tokmakov
b9e5c586e6
Merge pull request #45566 from ClickHouse/resubmit_45493
Resubmit "Fix possible in-use table after DETACH"
2023-01-25 16:39:55 +03:00
Alexander Tokmakov
6eb557b2ba Merge branch 'master' into exception_message_patterns4 2023-01-25 13:49:17 +01:00
Robert Schulze
59528cfca0
Merge pull request #45460 from ClickHouse/inv-index-cleanup
Cleanup of inverted index
2023-01-25 13:23:38 +01:00
Vladimir C
cfefaebe8f
Merge pull request #45558 from ClickHouse/vdimir/remove-ast-fuse 2023-01-25 11:25:36 +01:00
Sergei Trifonov
0d1ea05ff6
Merge pull request #45007 from ClickHouse/cancellable-mutex-integration
Fast shared mutex integration
2023-01-25 11:15:46 +01:00
Alexander Tokmakov
6621834e37 fix 2023-01-24 17:10:54 +01:00
vdimir
0e09d0a00c
Remove FuseSumCountAggregatesVisitor 2023-01-24 14:58:26 +00:00
Alexander Tokmakov
31e16c4b4d fix 2023-01-24 15:29:19 +01:00
Antonio Andelic
ffa3d1d603 Run query on 1 replica if no custom_key 2023-01-24 13:58:42 +00:00
Alexander Tokmakov
6ecae8388e Merge branch 'master' into exception_message_patterns4 2023-01-24 14:42:36 +01:00
Alexander Tokmakov
42a976fe3d Revert "Revert "Merge pull request #45493 from azat/fix-detach""
This reverts commit 9dc4f02d15.
2023-01-24 14:15:51 +01:00
SmitaRKulkarni
d387835774
Merge branch 'master' into 45486_Fix_flaky_test_for_disallowing_concurrent_backups_restores 2023-01-24 13:49:32 +01:00
Vladimir C
f818e3070d
Merge pull request #45391 from ClickHouse/vdimir/join_prewhere_bug_44062 2023-01-24 13:23:31 +01:00
Alexander Tokmakov
c25e5ff8de
Merge pull request #45545 from ClickHouse/revert_45439
Revert "Merge pull request #45493 from azat/fix-detach"
2023-01-24 15:21:33 +03:00
Vladimir C
0403f801a8
Merge pull request #44238 from ClickHouse/vdimir/grace_join_mem 2023-01-24 13:02:11 +01:00
Antonio Andelic
7df545fbe3 Remove unused define 2023-01-24 11:21:09 +00:00
Alexander Tokmakov
9dc4f02d15 Revert "Merge pull request #45493 from azat/fix-detach"
This reverts commit a182a6b851, reversing
changes made to c47a29a089.
2023-01-24 12:20:37 +01:00
Antonio Andelic
95853af459 Merge branch 'master' into custom-key-parallel-replicas 2023-01-24 10:49:40 +00:00
Antonio Andelic
37b62b3a58 Use Map for custom_key 2023-01-24 10:46:47 +00:00
Robert Schulze
9ff2bfcbf5
Merge remote-tracking branch 'origin/master' into inv-index-cleanup
src/Interpreters/GinFilter.cpp
	src/Interpreters/InterpreterCreateQuery.cpp
	src/Storages/MergeTree/MergeTreeData.cpp
	src/Storages/MergeTree/MergeTreeDataPartWriterOnDisk.cpp
	src/Storages/MergeTree/MergeTreeIndexInverted.cpp
2023-01-24 10:09:42 +00:00
Smita Kulkarni
642f9ca549 Merge branch 'master' into 45486_Fix_flaky_test_for_disallowing_concurrent_backups_restores 2023-01-24 09:37:28 +01:00
Roman Vasin
640bb66065 Move StorageFactory to top of doCreateTable for temp tables 2023-01-24 07:39:29 +00:00
Roman Vasin
78c0a6ab12 Set Memory engine when there is no storage 2023-01-24 07:23:47 +00:00
Roman Vasin
aa0f01a409 Fix bug with DROP TEMPORARY TABLE for MergeTree 2023-01-24 06:54:19 +00:00
Alexander Tokmakov
414693feb2 fixes 2023-01-24 00:46:03 +01:00
Alexander Tokmakov
bb4c8e169f check number of parameters in format string 2023-01-23 23:16:16 +01:00
Alexander Tokmakov
3f6594f4c6 forbid old ctor of Exception 2023-01-23 22:18:05 +01:00
Alexander Tokmakov
70d1adfe4b
Better formatting for exception messages (#45449)
* save format string for NetException

* format exceptions

* format exceptions 2

* format exceptions 3

* format exceptions 4

* format exceptions 5

* format exceptions 6

* fix

* format exceptions 7

* format exceptions 8

* Update MergeTreeIndexGin.cpp

* Update AggregateFunctionMap.cpp

* Update AggregateFunctionMap.cpp

* fix
2023-01-24 00:13:58 +03:00
Robert Schulze
f2f520485f
Update src/Interpreters/GinFilter.h
Co-authored-by: Sergei Trifonov <sergei@clickhouse.com>
2023-01-23 20:49:25 +01:00
Robert Schulze
0ab7ae6c17
Merge pull request #43797 from ClickHouse/query-result-cache
Query result cache [experimental]
2023-01-23 19:54:35 +01:00
Vladimir C
121adf309d
Merge branch 'master' into vdimir/grace_join_mem 2023-01-23 19:39:03 +01:00
vdimir
5be2b31e67
Review fixes 2023-01-23 18:09:26 +00:00
Maksim Kita
7b48c75e82
Merge pull request #45485 from kitaisreal/remove-unnecessary-get-total-row-count-function-calls
Remove unnecessary getTotalRowCount function calls
2023-01-23 21:02:51 +03:00
Roman Vasin
d898a4279a Add possibility to create MergeTree tables 2023-01-23 15:56:45 +00:00
Kseniia Sumarokova
8ec39ab6f3
Merge pull request #45442 from kssenii/minor-changes
Minor improvements around reading from remote
2023-01-23 15:46:30 +01:00
Alexander Tokmakov
a182a6b851
Merge pull request #45493 from azat/fix-detach
Fix possible in-use table after DETACH
2023-01-23 17:36:45 +03:00
Kruglov Pavel
fd7e04a96d
Merge pull request #45446 from kssenii/fix-assertion-in-cache-over-local
Fix Buffer's offsets mismatch logical error in stress test
2023-01-23 14:38:25 +01:00
vdimir
dac86d48d2
fixing join data was released 2023-01-23 12:34:36 +00:00
Sergei Trifonov
0fbfa17863
Merge branch 'master' into cancellable-mutex-integration 2023-01-23 12:44:09 +01:00
Smita Kulkarni
383af7f3a6 Moved settings inside backups section - Updated backup/restore status when concurrent backups & restores are not allowed 2023-01-23 08:59:44 +01:00
Kseniia Sumarokova
c3d545b64a
Merge pull request #45489 from azat/build/queue-fwd-decl
Forward declaration of ConcurrentBoundedQueue in ThreadStatus
2023-01-22 20:23:05 +01:00
Antonio Andelic
44ef00dc05 Merge branch 'master' into custom-key-parallel-replicas 2023-01-22 14:20:58 +00:00
Robert Schulze
340f406553
Merge branch 'master' into query-result-cache 2023-01-22 13:21:36 +01:00
Robert Schulze
531e64dc39
Merge branch 'master' into inv-index-cleanup 2023-01-22 13:20:38 +01:00
Azat Khuzhin
ca8af3d18c Fix possible in-use table after DETACH
Right now in case of DETACH/ATTACH there can be a window when after the
table had been DETACH'ed someone will still use it, the common example
here is MVs handling.

It happens because TableExclusiveLockHolder does not guards the
shard_ptr of the IStorage, and so if someone holds it, then it can use
it. So if ATTACH will be done for this table then, you can have multiple
instances of it.

It is not possible for DROP, because before using a table, you should
lock it and after table had been DROP'ed you cannot lock it anymore.

So let's do the same for DETACH.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-22 13:18:56 +01:00
Maksim Kita
6594aa8f1e
Merge pull request #44234 from kitaisreal/analyzer-expired-context-crash-fix
Analyzer expired Context crash fix
2023-01-21 18:49:50 +03:00
Azat Khuzhin
2a8f116c18 Forward declaration of ConcurrentBoundedQueue in ThreadStatus
ThreadStatus is the header that recomplies almost all ClickHouse
modules.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-21 16:02:09 +01:00
Maksim Kita
5146087db1 Fix style 2023-01-21 12:19:09 +01:00
Nikolai Kochetov
ec1e2436cc
Merge pull request #45450 from ClickHouse/fix-disabled-two-level-agg
Fix disabled two-level aggregation from HTTP
2023-01-21 12:01:59 +01:00
Maksim Kita
47385a19e7 Remove unnecessary getTotalRowCount function calls 2023-01-21 11:27:07 +01:00
vdimir
e30ab0874b
Review fixes 2023-01-20 16:30:34 +00:00
Roman Vasin
fa64203225 Add correct data path for temporary tables; Clean temp DB dir on server startup 2023-01-20 16:11:37 +00:00
Alexander Tokmakov
910d6dc0ce
Merge pull request #45342 from ClickHouse/exception_message_patterns
Save message format strings for DB::Exception
2023-01-20 18:46:52 +03:00
kssenii
8904cd5697 Refactoring 2023-01-20 16:30:25 +01:00
Nikolai Kochetov
039901b395 Fixing build 2023-01-20 13:49:50 +00:00
kssenii
545d3c276c Fix tests 2023-01-20 14:09:04 +01:00
Nikolai Kochetov
1e29993aef Fixing build 2023-01-20 11:55:20 +00:00
Robert Schulze
72973076c9
Rename MergeTreeIndexGin.h/cpp to MergeTreeIndexInverted.h/cpp 2023-01-20 11:42:36 +00:00
Maksim Kita
e067a55b78 Fixed tests 2023-01-20 12:19:16 +01:00
Robert Schulze
3267ac2787
Prefix more typedefs in DB namespace with "Gin" 2023-01-20 11:19:07 +00:00
Antonio Andelic
fc9c53f963 Merge branch 'master' into custom-key-parallel-replicas 2023-01-20 11:18:30 +00:00
Robert Schulze
f8b446f517
Move method implementations (no other changes) 2023-01-20 10:57:16 +00:00
Robert Schulze
0653f86de9
Various cosmetic cleanups 2023-01-20 10:45:35 +00:00
Azat Khuzhin
1f9a65b875 Modernize InternalTextLogsQueue::getPriorityName()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-20 11:09:35 +01:00
Azat Khuzhin
fc276abadd Fix log level "Test" for send_logs_level in client
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-20 11:09:35 +01:00
Antonio Andelic
0ad37ad286
Merge pull request #45320 from stigsb/system_tables_volume_config
Add <storage_policy> config parameter for system logs
2023-01-20 10:27:57 +01:00
Robert Schulze
5ec6d89d43
Merge pull request #38667 from ClibMouse/ftsearch
Inverted Indices Implementation
2023-01-20 10:18:05 +01:00
Roman Vasin
8453c9d27d Add construction of temporary tables by StorageFactory 2023-01-20 07:47:08 +00:00
Nikolai Kochetov
3e00d18498 Merge branch 'master' into fix-disabled-two-level-agg 2023-01-19 20:54:04 +00:00
Nikolai Kochetov
d24be2712e Fix disabled two-level aggregation from HTTP 2023-01-19 20:50:27 +00:00
kssenii
170426c0a9 Fix style check 2023-01-19 19:18:24 +01:00
kssenii
f56f515392 Fix 2023-01-19 18:45:06 +01:00
kssenii
4ce8950712 Minor changes 2023-01-19 17:53:10 +01:00
larryluogit
52ae33dba7
Merge branch 'master' into ftsearch 2023-01-19 11:34:11 -05:00
Antonio Andelic
6394a004fb Refactor 2023-01-19 14:47:58 +00:00
Antonio Andelic
d8adff35c3 Fix style 2023-01-19 12:08:32 +00:00
Antonio Andelic
53b53a1ec9 Add replcia shuffling 2023-01-19 12:04:07 +00:00
Antonio Andelic
ddfb913f99 better 2023-01-19 11:28:26 +00:00
Antonio Andelic
3b0c63551e Combine approaches 2023-01-19 10:26:38 +00:00
Antonio Andelic
7a75144ce3 Refactor 2023-01-19 09:42:54 +00:00
Stig Bakken
420c179b55 Add <storage_policy> config parameter for system logs 2023-01-19 10:25:28 +01:00
SmitaRKulkarni
db03dd1bb9
Merge branch 'master' into 43891_Disallow_concurrent_backups_and_restores 2023-01-19 09:32:50 +01:00
Antonio Andelic
1c0a3e38c0 Fix queries with Distributed storage 2023-01-19 08:13:59 +00:00
Antonio Andelic
2a1f35e661 Revert some changes 2023-01-19 07:59:57 +00:00
Roman Vasin
9fa4502b78 Add new constructor for TemporaryTableHolder 2023-01-19 07:12:29 +00:00
kssenii
b1426ddbdd Refactoring 2023-01-18 21:34:23 +01:00
Alexander Tokmakov
7a824af09e fix 2023-01-18 14:30:20 +01:00
vdimir
b76779797a
Do not move to prewhere in select with joins 2023-01-18 12:17:30 +00:00
Antonio Andelic
a37ca4b961 Merge branch 'master' into custom-key-parallel-replicas-with-shard 2023-01-18 11:53:04 +00:00
Maksim Kita
21b288c620 Fixed build 2023-01-18 10:44:40 +01:00
Roman Vasin
0e31bd56d8 Call constructor of TemporaryTableHolder with creator 2023-01-18 06:47:47 +00:00
Robert Schulze
4f90824347
Merge remote-tracking branch 'origin/master' into query-result-cache 2023-01-17 22:49:53 +00:00
Suzy Wang
1093a42f68 window view fix 2023-01-17 12:04:01 -08:00
Alexander Tokmakov
1413b9537c make error patterns more useful 2023-01-17 20:04:25 +01:00
Alexander Tokmakov
5cd90c1a3e Merge branch 'master' into exception_message_patterns 2023-01-17 20:04:04 +01:00
Alexander Tokmakov
72e8615bec formatting of some exception messages 2023-01-17 20:03:56 +01:00
Alexander Tokmakov
8b13b85ea0
Merge pull request #44543 from ClickHouse/text_log_add_pattern
Add a column with a message pattern to text_log
2023-01-17 20:19:32 +03:00
kssenii
9bb283f050 Fix tests 2023-01-17 16:41:44 +01:00
HarryLeeIBM
e7add8218f Addressed more review comments and ClangTidy errors 2023-01-17 06:29:13 -08:00
Antonio Andelic
dd31de18a3 Extend where correctly 2023-01-17 13:31:09 +00:00
kssenii
4556b516d7 Merge remote-tracking branch 'upstream/master' into cache-better-locks 2023-01-17 14:06:04 +01:00
Antonio Andelic
bd352068d7 Turn replicas into shard for custom_key 2023-01-17 12:34:42 +00:00
vdimir
60acd5e424
fix clang tidy 2023-01-17 12:21:56 +00:00
vdimir
1e9ccfb4b9
wip 2023-01-17 12:21:56 +00:00
vdimir
40bf9939b7
Update JoinSwitcher::switchJoin 2023-01-17 12:21:55 +00:00
vdimir
e0e60bb460
wip 2023-01-17 12:21:55 +00:00
vdimir
4aecb836a9
Fix JoinMask 2023-01-17 12:21:55 +00:00
vdimir
18d751aed4
wip 2023-01-17 12:21:54 +00:00
vdimir
beb8ba7e62
wip 2023-01-17 12:21:54 +00:00
vdimir
57a35cae33
wip 2023-01-17 12:21:53 +00:00
vdimir
efcfcca545
Fix HashJoin::getTotalByteCount caclulation 2023-01-17 12:21:53 +00:00
vdimir
b0c4e18464
Fix double initialization GraceHashJoin::initBuckets 2023-01-17 12:21:53 +00:00
Antonio Andelic
a85565c4a6 Merge branch 'master' into custom-key-parallel-replicas 2023-01-17 07:37:18 +00:00
Alexander Tokmakov
522686f78b less empty patterns 2023-01-17 01:19:44 +01:00
Anton Popov
6863cd152f
Merge pull request #42181 from CurtizJ/optimize-loading-parts
Do not load inactive parts at startup
2023-01-16 14:38:50 +01:00
Nikolay Degterinsky
70e79de69b
Merge pull request #38252 from bharatnc/ncb/weighted-quantile-approx
add quantileInterpolatedWeighted function
2023-01-16 13:41:13 +01:00
Nikolay Degterinsky
88ba1b0b85
Merge pull request #42884 from evillique/better_asterisk_parser
Improve Asterisk and ColumnMatcher parsers
2023-01-16 13:29:59 +01:00
Maksim Kita
0c7e0be0b6 Analyzer support INSERT SELECT 2023-01-16 12:17:14 +01:00
Maksim Kita
80f6a45376
Merge pull request #44641 from ClickHouse/vdimir/view_explain_2
Function viewExplain accept SELECT and settings
2023-01-16 13:39:53 +03:00
Antonio Andelic
57e771226c Add range mode for custom key 2023-01-16 10:11:21 +00:00
Antonio Andelic
36cf9debae Merge branch 'master' into custom-key-parallel-replicas 2023-01-16 08:11:08 +00:00
Robert Schulze
099e30ef2a
Merge remote-tracking branch 'origin/master' into query-result-cache 2023-01-16 08:04:49 +00:00
Robert Schulze
27fe7ebd93
Cosmetics 2023-01-15 16:12:48 +00:00
Nikolay Degterinsky
24b686734d Fix build 2023-01-15 13:46:55 +00:00
Alexander Tokmakov
2d7773fccc Merge branch 'master' into text_log_add_pattern 2023-01-13 20:33:46 +01:00
Nikolay Degterinsky
36c20bf293 Merge remote-tracking branch 'upstream/master' into better_asterisk_parser 2023-01-13 19:15:55 +00:00
vdimir
bdb9222736
Support EXPLAIN SYNTAX oneline = 1 2023-01-13 12:18:58 +00:00
Maksim Kita
44f4184e11
Merge pull request #44540 from kitaisreal/analyzer-support-distributed
Analyzer support distributed queries processing
2023-01-13 14:45:36 +03:00
Robert Schulze
88df1df3e6
Fix Darwin build 2023-01-13 10:26:49 +00:00
Antonio Andelic
e64f07e72b Merge branch 'master' into custom-key-parallel-replicas 2023-01-13 08:44:53 +00:00
Robert Schulze
15e11741cb
Cosmetics 2023-01-13 00:00:23 +00:00
Robert Schulze
1b53307375
Refcount cache entries to improve lookup performance 2023-01-12 23:38:39 +00:00
Robert Schulze
0c528fca29
Introduce SourceFromChunks to avoid unnecessary partial result chunk concatenation 2023-01-12 23:01:00 +00:00
Nikolai Kochetov
30310df5be
Merge branch 'master' into logical-optimizer-lowcardinality 2023-01-12 18:51:05 +01:00
Arthur Passos
5727d14e92
Merge branch 'master' into add_select_final_mt_setting 2023-01-12 14:42:55 -03:00
serxa
693489a8ad review fixes 2023-01-12 15:51:04 +00:00
Sergei Trifonov
12d8543578
Merge branch 'master' into cancellable-mutex-integration 2023-01-12 16:03:49 +01:00
Kseniia Sumarokova
db3e0219fc
Merge pull request #41687 from ClickHouse/40907_Parameterized_views_as_table_functions
40907 Parameterized views as table functions
2023-01-12 14:24:32 +01:00
Arthur Passos
1b3c7766f8
Merge branch 'master' into add_select_final_mt_setting 2023-01-12 08:31:04 -03:00
Maksim Kita
a140d6c5b1 Fixed code review issues 2023-01-12 12:07:58 +01:00
Maksim Kita
47f4159909 Analyzer support distributed queries processing 2023-01-12 12:07:58 +01:00
Vladimir C
ac5ee471c7
Merge pull request #45184 from ClickHouse/vdimir/storage_join_null_44940 2023-01-12 11:51:11 +01:00
taiyang-li
36a57f05dd Merge branch 'improve_count_if' of https://github.com/bigo-sg/ClickHouse into improve_count_if 2023-01-12 17:40:13 +08:00
taiyang-li
082e25b88e fix failed tests 2023-01-12 17:39:50 +08:00
vdimir
3e9d142066
Fix wrong column nullability in StoreageJoin 2023-01-11 16:17:21 +00:00
Robert Schulze
12a29fec35
Hide secrets from system.query_result_cache 2023-01-11 12:50:45 +00:00
Sergei Trifonov
399cb8a8ba
Merge pull request #43586 from ZhiguoZh/20221124-thread-group-mem-rel
Move memory deallocation out of critical section of ThreadGroupStatus::mutex
2023-01-11 13:03:23 +01:00
Nikolai Kochetov
5e7a6ac619
Merge pull request #45122 from ClickHouse/revert-45121-revert-44653-custom-reading-for-mutation
Revert "Revert "Custom reading for mutation""
2023-01-11 12:37:32 +01:00
Antonio Andelic
f950b75ef0 Fix 2023-01-11 10:42:01 +00:00
Antonio Andelic
19e5988d33 Better 2023-01-11 09:57:13 +00:00
Zhiguo Zhou
be4d79e924 Deallocate memory of profile events out of critical section
To further shrink the critical section for releasing memory of the
profile events (ProfileEventsCountersAndMemory), this commit puts
the dealloaction out of the critical section while keeping the
memory move under lock. This change could mitigate the contention
for ThreadGroupStatus::mutex.
2023-01-11 09:58:30 +08:00
Anton Popov
6c4f53bdca Merge remote-tracking branch 'upstream/master' into HEAD 2023-01-11 01:00:57 +00:00
Nikolai Kochetov
7701dc571e
Update MutationsInterpreter.cpp 2023-01-10 18:19:38 +01:00
HarryLeeIBM
fcf17fdc72 Fix styles. 2023-01-10 09:09:11 -08:00
Nikolai Kochetov
71333afd5a Fixing a test. 2023-01-10 16:40:10 +00:00
HarryLeeIBM
bc48b17817 Addressed more review comments. 2023-01-10 08:26:27 -08:00
Maksim Kita
fbba28b31e Analyzer aggregation without column fix 2023-01-10 16:49:55 +01:00
Antonio Andelic
347ccab8f9
Merge branch 'master' into custom-key-parallel-replicas 2023-01-10 16:31:40 +01:00
Nikolai Kochetov
4673b3fe1d
Revert "Revert "Custom reading for mutation"" 2023-01-10 16:31:01 +01:00
Alexander Tokmakov
c8ec130be4
Revert "Custom reading for mutation" 2023-01-10 17:51:30 +03:00
Antonio Andelic
fbe4808b6b Add support for custom key in parallel replicas 2023-01-10 13:13:43 +00:00
Yakov Olkhovskiy
9e327306a3
Merge pull request #45043 from ClickHouse/fix-ip-function-hash
Fix hash functions for IPv4
2023-01-10 07:48:12 -05:00
Nikolai Kochetov
11418963c0
Merge pull request #44653 from ClickHouse/custom-reading-for-mutation
Custom reading for mutation
2023-01-10 12:16:24 +01:00
Robert Schulze
923fa2c15a
Fix review comments, pt. II 2023-01-10 10:21:08 +00:00
Robert Schulze
0c3b034887
Merge remote-tracking branch 'origin/master' into query-result-cache 2023-01-10 09:02:41 +00:00
Alexey Milovidov
3963eeae16
Merge pull request #45058 from nickitat/fix_grouping_sets_with_memory_efficient_aggr
Disable memory efficient merging for distributed aggregation when grouping sets are present
2023-01-10 05:08:55 +03:00
Yakov Olkhovskiy
2559c49810 make only IPv4 as numeric, fix hash functions for IPv6, add more hash functions to test 2023-01-10 02:03:06 +00:00
Alexander Gololobov
4a6ceb8a66
Merge pull request #44959 from liangliangpan/liangliangpan-patch-fix-alter-ttl-error
fix alter table ttl error  when wide part has light weight delete mask
2023-01-10 01:17:08 +01:00
kssenii
e1d7ea49ca Fix cleanup of empty key directories 2023-01-09 23:50:50 +01:00
Robert Schulze
ad4884b394
Fix review comments, pt. I 2023-01-09 21:42:51 +00:00
Nikolai Kochetov
3e430b1b6e Add comments. Remove unused flag from Context. 2023-01-09 19:52:11 +00:00
Smita Kulkarni
93530e8d34 Added settings to disallow concurrent backups and restores
Implementation:
* Added server level settings to disallow concurrent backups and restores, which are read and set when BackupWorker is created in Context.
* Settings are set to true by default.
* Before starting backup or restores, added a check to see if any other backups/restores are running (except internal ones).
Testing:
* Added a test test_backup_and_restore_on_cluster/test_disallow_concurrency.
2023-01-09 18:14:39 +01:00
kssenii
7fa27ddc7f Use key locks instead of key prefix locks 2023-01-09 16:54:08 +01:00
kssenii
0c3d2f1dc1 Fix deadlock on cache mutex 2023-01-09 16:01:24 +01:00
Alexander Gololobov
742887ce53
Merge pull request #44718 from ClickHouse/lwd_mutation_always_sync
Make lightweight deletes always synchronous
2023-01-09 15:58:02 +01:00
Alexander Gololobov
321c987a51
Merge branch 'master' into liangliangpan-patch-fix-alter-ttl-error 2023-01-09 15:17:12 +01:00
Kseniia Sumarokova
b22b51213f
Merge pull request #44868 from kssenii/improve-async-buffer-from-remote
Small perf improvement for async buffer from remote
2023-01-09 13:31:15 +01:00
Nikita Taranov
006fdd32d4
Apply preallocation optimisation more carefully (#44455)
* impl

* add perf test

* fix

* review fixes
2023-01-09 13:30:48 +01:00
Nikita Mikhaylov
857799fbca
Parallel distributed insert select with s3Cluster [3] (#44955)
* Revert "Revert "Resurrect parallel distributed insert select with s3Cluster (#41535)""

This reverts commit b8d9066004.

* Fix build

* Better

* Fix test

* Automatic style fix

Co-authored-by: robot-clickhouse <robot-clickhouse@users.noreply.github.com>
2023-01-09 13:30:32 +01:00
Nikita Taranov
82963e4227 impl 2023-01-09 12:12:55 +00:00
Alexander Gololobov
ebb17c6a76 More generic fix 2023-01-09 12:06:58 +01:00
Yakov Olkhovskiy
45780644bc fix convert field for IPv4 and IPv6 - as represented by number 2023-01-09 07:27:17 +00:00
Sergei Trifonov
81d2ea30ba
Merge branch 'master' into cancellable-mutex-integration 2023-01-07 19:37:46 +01:00
Anton Popov
1f32ffedf8
Merge pull request #43221 from ClickHouse/refactoring-ip-types
Replace domain IP types (IPv4, IPv6) with native
2023-01-07 12:01:21 +01:00
serxa
15bb127b01 replace every std::shared_mutex with DB::FastSharedMutex 2023-01-06 23:35:38 +00:00
Robert Schulze
45dbcf88e5
Merge remote-tracking branch 'origin/master' into query-result-cache 2023-01-06 20:42:48 +00:00
kssenii
539f4fde1c Pass queue lock implicitly 2023-01-06 21:36:41 +01:00
kssenii
4fd0be7f03 Fix TemporaryDataOnDisk with cache 2023-01-06 18:24:38 +01:00
Dmitry Novik
9d44c7a737
Merge pull request #44541 from ClickHouse/cleanup-resolved-function
Followup #43761
2023-01-06 18:09:32 +01:00
Nikolai Kochetov
cadaf35db6
Merge pull request #44987 from ClickHouse/better-check-for-not-existing-input-in-actions-dag
Fix check for not existing input in ActionsDAG
2023-01-06 18:02:38 +01:00
kssenii
8fde606768 Resolve some review comments 2023-01-06 16:10:00 +01:00
kssenii
2a030c1dc0 Merge remote-tracking branch 'upstream/master' into allow-single-disk-instead-of-storage-policy 2023-01-06 15:58:27 +01:00
Nikolai Kochetov
72eb74dd67 Fix check for not existing input in ActionsDAG 2023-01-06 14:50:28 +00:00
kssenii
ce3014669b Fix style check, fix TemporaryDataOnDisk 2023-01-06 15:38:31 +01:00
Ilya Yatsishin
4bedd2ca59
fix style 2023-01-06 15:16:44 +01:00
kssenii
fc24c92e53 Remove some code 2023-01-06 14:57:35 +01:00
Kseniia Sumarokova
573d3283b0
Merge pull request #44327 from kssenii/use-new-named-collections-code-2
Replace old named collections code with new (from #43147) part 2
2023-01-06 13:06:26 +01:00
Nikolai Kochetov
bb74db22b3
Merge pull request #44920 from ClickHouse/select-respect-required-columns-order
Respect requested columns order for select.
2023-01-06 12:54:18 +01:00
Mingliang Pan
c98e52e9ee
fix alter table ttl error when this table has light weight delete mask file (_row_exists.bin)
After  applying light weight delete to MergeTree table,  a delete mask file (_row_exists.bin) will appears in the wide part directory.  Then we execute "ALTER TABLE xxxxxx  MODIFY TTL xxxx" to this table, clickhouse will report error in log message:   "NOT_FOUND_COLUMN_IN_BLOCK, Not found column _row_exists  in block".   
The root cause of this bug is that:  in MutationsInterpreter::prepare(), when constructing the select columns,  it does not include the system columns, but only physic columns (not include _row_exists.bin).  however the output block of the execute pipeline contains _row_exists column, then error occurs.

this bug is severe, because mutate TTL will continuously to execute, never end. the only workaround is to truncate the whole table.

the fix is to return all columns including row_exists when executing alter table TTL query
2023-01-06 10:58:34 +08:00
Alexey Milovidov
c1f6555b32
Merge pull request #44755 from ClickHouse/44736_Fix_logical_error_for_qualified_asterisk
Fix for qualified asterisks with alias table name and column transformer
2023-01-06 03:28:22 +03:00
Alexey Milovidov
663cc5fcc1
Merge pull request #44886 from eherrerosj/patch-1
fix-typo
2023-01-06 03:23:42 +03:00
kssenii
0a0b46f4c2 Better 2023-01-05 21:52:42 +01:00
Alexander Gololobov
102dd8bd45
Merge branch 'master' into lwd_mutation_always_sync 2023-01-05 21:20:14 +01:00
Dmitry Novik
ebead611b6
Merge branch 'master' into cleanup-resolved-function 2023-01-05 19:27:08 +01:00
Robert Schulze
9ef7dac0b5
Fix exception fix in TraceCollector dtor
Cf. #44758

Function try blocks in ctors/dtors implicitly rethrow, making them
more or less useless.

https://www.onlinegdb.com/pCKQA0wTIN (click RUN)

https://stackoverflow.com/questions/5612486/when-is-a-function-try-block-useful/5612508#5612508

Fortunately, this seems the only place like that in the codebase.
2023-01-05 18:27:07 +00:00
Nikolai Kochetov
f629425f96
Merge pull request #44447 from ClickHouse/42637_Disallow_arrayJoin_in_mutations
Disallow arrayjoin in mutations
2023-01-05 18:00:16 +01:00
Nikolai Kochetov
1bbf8c84a4
Update InterpreterSelectWithUnionQuery.cpp 2023-01-05 17:29:16 +01:00
Anton Popov
ed00399eb6 Merge remote-tracking branch 'upstream/master' into HEAD 2023-01-05 14:12:02 +00:00
Nikolai Kochetov
9fd56e100a Add a comment. 2023-01-05 13:20:47 +00:00
Larry Luo
fd0c6cccc8 Fixed style error 2023-01-04 20:08:28 -08:00
Larry Luo
7a4d499cb1 Added density to control Inverted index size 2023-01-04 19:42:45 -08:00
Robert Schulze
4fcead15c3
Fix handling of exceptions during query runtime 2023-01-04 22:33:04 +00:00
Robert Schulze
0c15e06578
Cosmetics 2023-01-04 22:31:52 +00:00
kssenii
64fde45962 Correct merge 2023-01-04 22:04:25 +01:00
Nikolai Kochetov
533911b28b Respect requested columns order for select. 2023-01-04 19:59:15 +00:00
kssenii
9014c818ae Merge remote-tracking branch 'upstream/master' into try-perf 2023-01-04 20:56:32 +01:00
Yakov Olkhovskiy
dadd96ba6f
Merge pull request #44135 from ClickHouse/feature-protocol-proxy
Improve support for PROXYv1 protocol.
2023-01-04 14:06:17 -05:00
kssenii
25f8e8467a Rewrite locking in cache - intermediate state 2023-01-04 18:56:45 +01:00
Yakov Olkhovskiy
7a5a36cbed
Merge branch 'master' into refactoring-ip-types 2023-01-04 11:11:06 -05:00
Dmitry Novik
8f21eb543c Fix argument evaluation order 2023-01-04 16:00:47 +00:00