Commit Graph

39674 Commits

Author SHA1 Message Date
Alexey Milovidov
67d65a9245
Merge pull request #48121 from ClickHouse/vdimir/sparkbar-overflow-fix
Fix overflow in sparkbar function
2023-04-02 19:36:24 +03:00
kssenii
6d75ca9c6f Fix 2023-04-02 18:21:45 +02:00
Kseniia Sumarokova
d2522a2dba
Merge pull request #48312 from kssenii/merging-ilejn-dict-named-collection
Merging #46323
2023-04-02 18:12:44 +02:00
Alexey Milovidov
9c6594a043
Merge pull request #48320 from azat/explain-fix
Fix crash in EXPLAIN PIPELINE for Merge over Distributed
2023-04-02 17:11:27 +03:00
Alexander Tokmakov
1e4ae7a3f2
Merge pull request #48314 from azat/build/strong-typedefs
Fix ThreadPool for DistributedSink and use StrongTypedef for CurrentMetrics/ProfileEvents/StatusInfo to avoid further errors
2023-04-02 14:57:33 +03:00
Azat Khuzhin
907ed27ae2 Fix crash in EXPLAIN PIPELINE for Merge over Distributed
CI: https://s3.amazonaws.com/clickhouse-test-reports/48314/179450542879d11711cd2415c3fa7eeab18188be/fuzzer_astfuzzerasan/report.html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-04-02 10:48:23 +02:00
KevinyhZou
c2687c0544 review fix 2023-04-02 14:14:35 +08:00
KevinyhZou
da4ff587af review fix 2023-04-02 12:38:17 +08:00
KevinyhZou
7d59f36336 code style fix 2023-04-02 12:37:18 +08:00
KevinyhZou
ce5f4cf4ab code review fix 2023-04-02 12:37:18 +08:00
KevinyhZou
0935ccf0e0 ci fix 2023-04-02 12:30:59 +08:00
KevinyhZou
2126199193 check style 2023-04-02 12:30:59 +08:00
KevinyhZou
e0a10dc62f enable nullable return type 2023-04-02 12:30:59 +08:00
KevinyhZou
740a5ef777 enable return null and complext type 2023-04-02 12:29:12 +08:00
kssenii
ddf2af598d Fix 2023-04-01 20:52:22 +02:00
kssenii
8cfd544328 Better 2023-04-01 18:41:42 +02:00
Alexander Tokmakov
230adac9f6 fixes 2023-04-01 18:23:59 +02:00
Robert Schulze
3315acd122
Merge pull request #48222 from ClickHouse/rs/no-default-format-string
parseDateTime[InJodaSyntax](): Require format argument
2023-04-01 16:59:33 +02:00
Azat Khuzhin
fbc99d7788 Use StrongTypedef for StatusInfo
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-04-01 16:01:33 +02:00
Azat Khuzhin
c64f9e6f07 Use StrongTypedef for ProfileEvents
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-04-01 16:01:33 +02:00
Azat Khuzhin
8d0e516310 Use StrongTypedef for CurrentMetrics to avoid possible incorrect usage
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-04-01 16:01:33 +02:00
Azat Khuzhin
3ede50ccfc Fix MaxPushedDDLEntryID 2023-04-01 16:00:03 +02:00
Azat Khuzhin
f69441b633 Fix ThreadPool usage in gtest_thread_pool_limit
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-04-01 16:00:03 +02:00
Azat Khuzhin
ba6ecd2d4e Fix ThreadPool for DistributedSink
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-04-01 16:00:03 +02:00
Alexander Tokmakov
48b23dd012
Fix race between DROP MatView and RESTART REPLICAS (#47863)
* fix race between drop mv and restart replicas

* unrelated: fix bad exception messages

* fix test

* fix

* fix

* fix

* fix

* fix test

* fix

* fix test

* Update 02437_drop_mv_restart_replicas.sh

* fix tests
2023-04-01 15:26:00 +03:00
kssenii
f96e7b59a2 Better 2023-04-01 13:19:07 +02:00
kssenii
1721b70070 Merge remote-tracking branch 'upstream/master' into ilejn-dict-named-collection 2023-04-01 13:18:26 +02:00
kssenii
6ff728fb4d Fix cpu usage in rabbitmq 2023-04-01 11:45:25 +02:00
Alexander Gololobov
bf02068702
Merge pull request #48303 from ClickHouse/grouping-sets-repeated-keys
Do not remove inputs from maybe compiled DAG.
2023-04-01 11:39:34 +02:00
Vitaly Baranov
3f4aadfe7d Add logging for concurrency checks for backups. 2023-03-31 23:50:35 +02:00
Yakov Olkhovskiy
2f280e247a review suggestions 2023-03-31 21:37:18 +00:00
Alexander Tokmakov
9df882c37a
Merge pull request #48085 from ClickHouse/sync_replica_lightweight
More options for `SYSTEM SYNC REPLICA`
2023-03-31 23:18:31 +03:00
Nikolai Kochetov
1693e46640 Do not remove inputs from maybe compiled DAG. 2023-03-31 19:03:20 +00:00
Alexander Tokmakov
9552b37414
Merge pull request #48267 from ClickHouse/fix_some_tests2
Fix some tests
2023-03-31 22:03:00 +03:00
avogar
6a66c3bc23 Fix tests 2023-03-31 18:37:12 +00:00
Nikolai Kochetov
e18d6dfac1
Merge branch 'master' into fix-possible-pipeline-stuck-on-partial-query-result 2023-03-31 20:04:43 +02:00
Robert Schulze
1e347e626c
Merge pull request #48241 from ClickHouse/rs/sort-show-processlist
Sort output of SHOW PROCESSLIST
2023-03-31 18:09:11 +02:00
Robert Schulze
ce95f9b912
Merge branch 'master' into build/hive-fix 2023-03-31 18:05:40 +02:00
avogar
70fb4ad0b8 Fix build 2023-03-31 15:56:54 +00:00
Anton Popov
3b98a43dc6
Merge branch 'master' into fix-race-storage-s3 2023-03-31 17:54:52 +02:00
Alexander Gololobov
ae0707ba01
Remove unused error codes 2023-03-31 17:23:42 +02:00
Alexander Tokmakov
e39498129c
Merge branch 'master' into sync_replica_lightweight 2023-03-31 18:17:08 +03:00
Antonio Andelic
1e3abc9e84 Add strict mode for KeeperMap 2023-03-31 14:24:32 +00:00
Robert Schulze
9094772712
Replace manual checking by validateFunctionArgumentTypes() 2023-03-31 14:22:10 +00:00
Robert Schulze
e1d299640b
Small follow-up to #48017 2023-03-31 14:11:37 +00:00
Alexander Tokmakov
75ffc8451b fix 2023-03-31 16:09:00 +02:00
Anton Popov
f715bd95f1 fix writing to StorageS3 2023-03-31 14:08:28 +00:00
Robert Schulze
5d64841276
Merge pull request #48017 from ClickHouse/rs/show_columns
MySQL compatibility: Implement `SHOW COLUMNS`
2023-03-31 15:50:23 +02:00
natasha
aa78728f17 copy forgotten show_secrets in FormatSettings semi-copy-ctor 2023-03-31 14:44:26 +01:00
Alexey Milovidov
3de29f5cc1
Merge pull request #48278 from azat/backups/fix-UB
Fix UB (signed integer overflow) in StorageMergeTree::backupData()
2023-03-31 16:35:10 +03:00
vdimir
2a179aed49
Fix usage common::addOverflow for floats in AggregateFunctionSparkbar 2023-03-31 13:35:07 +00:00
natasha
644d83653d only set the necessary FormatStateStacked settings 2023-03-31 14:10:16 +01:00
Anton Popov
12c7992d36
Merge pull request #48118 from CurtizJ/optimize-mapUpdate
Optimize function `mapUpdate`
2023-03-31 15:03:15 +02:00
Alexander Tokmakov
caf00b5968 Merge branch 'master' into sync_replica_lightweight 2023-03-31 14:52:55 +02:00
natasha
6caacd41d4 fix the code, single line formatter was forgotten 2023-03-31 13:45:12 +01:00
Alexey Milovidov
070210a02f
Merge pull request #48271 from vchekan/master
In messages, put values into quotes
2023-03-31 15:35:19 +03:00
Raúl Marín
aa8e5a1077 Don't use CURRENT_WRITE_BUFFER_IS_EXHAUSTED for expected behaviour 2023-03-31 14:09:21 +02:00
vdimir
2d18689af6
use common::addOverflow in AggregateFunctionSparkbar.h 2023-03-31 11:59:13 +00:00
Alexander Tokmakov
f54fd15112 fix 2023-03-31 12:58:11 +02:00
vdimir
24b46774b0
update AggregateFunctionSparkbar.h 2023-03-31 10:58:09 +00:00
vdimir
cc61d35bc5
Fix overflow in sparkbar function 2023-03-31 10:58:08 +00:00
Alexey Milovidov
d06ab59737
Merge pull request #48279 from ClickHouse/23.4-prepare
Update version after release
2023-03-31 13:28:30 +03:00
Alexey Milovidov
dd79bf0a03 Update autogenerated version to 23.4.1.1 and contributors 2023-03-31 12:20:50 +02:00
Robert Schulze
8d91a9f4c2
Sort descendingly by elapsed time 2023-03-31 09:36:03 +00:00
Azat Khuzhin
bac7def719 Fix UB (signed integer overflow) in StorageMergeTree::backupData()
UBsan report:

    /build/src/Storages/StorageMergeTree.cpp:2088:80: runtime error: signed integer overflow: 9223372036854775807 + 1 cannot be represented in type 'long'
        0 0x30c2ae7b in DB::StorageMergeTree::backupData(DB::BackupEntriesCollector&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::optional<absl::lts_20211102::InlinedVector<std::__1::shared_ptr<DB::IAST>, 7ul, std::__1::allocator<std::__1::shared_ptr<DB::IAST>>>> const&) build_docker/./src/Storages/StorageMergeTree.cpp:2088:80
        1 0x2dd641b5 in DB::BackupEntriesCollector::makeBackupEntriesForTableData(DB::QualifiedTableName const&) build_docker/./src/Backups/BackupEntriesCollector.cpp:703:18
        2 0x2dd5c2a7 in DB::BackupEntriesCollector::makeBackupEntriesForTablesData() build_docker/./src/Backups/BackupEntriesCollector.cpp:676:9
        3 0x2dd5848d in DB::BackupEntriesCollector::run() build_docker/./src/Backups/BackupEntriesCollector.cpp:119:5
        4 0x2dd84da3 in DB::BackupsWorker::doBackup(std::__1::shared_ptr<DB::ASTBackupQuery> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::BackupInfo const&, DB::BackupSettings, std::__1::shared_ptr<DB::IBackupCoordination>, std::__1::shared_ptr<DB::Context const> const&, std::__1::shared_ptr<DB::Context>, bool) build_docker/./src/Backups/BackupsWorker.cpp:359:59
        5 0x2dd82405 in DB::BackupsWorker::startMakingBackup(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const> const&) build_docker/./src/Backups/BackupsWorker.cpp:248:13
        6 0x2dd81d0a in DB::BackupsWorker::start(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context>) build_docker/./src/Backups/BackupsWorker.cpp:179:16
        7 0x2f4d0d5f in DB::InterpreterBackupQuery::execute() build_docker/./src/Interpreters/InterpreterBackupQuery.cpp:39:30

    SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /build/src/Storages/StorageMergeTree.cpp:2088:80 in

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-31 12:29:31 +03:00
Antonio Andelic
e982f2a67a Merge branch 'master' into enable-env-credentials-default 2023-03-31 09:11:01 +00:00
Robert Schulze
eb93ec35f5
Merge pull request #48154 from azat/varuint-v2
Add sanity checks for writing number in variable length format (resubmit)
2023-03-31 10:59:21 +02:00
Vadym Chekan
0f4c8144a6 In messages, put values into quotes
Configuration values, such as disk names, backup engine names, etc, may give error message unintended sense, for example, if trying to backup to `disk` instead of `Disk`, the error message will be "Not found backup engine disk", which can be interpreted as "disk of backup engine not found". It might be not clear that the word "disk" comes from the query and is not part of the error message.
2023-03-30 22:46:18 -07:00
Azat Khuzhin
e16b434631 Fix compiling examples without Hive
Skip compiling comma_separated_streams since it requires Hive.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-31 06:05:16 +02:00
Anton Popov
5ceb855e7f
Merge branch 'master' into fix-race-storage-s3 2023-03-31 04:16:35 +02:00
Alexander Tokmakov
64b1f74a60 fix 2023-03-31 01:39:49 +02:00
Alexander Tokmakov
29e85bd9a4
Merge branch 'master' into fix-threadpools 2023-03-31 01:03:06 +03:00
Anton Popov
38389d878c fix one more race in StorageS3 2023-03-30 21:06:53 +00:00
Sergei Trifonov
01ed4ffca4
Merge pull request #47870 from ClickHouse/segmentator-fix
Fix CPU usage counters update logic
2023-03-30 22:55:58 +02:00
Kruglov Pavel
4e1e5434c6
Fix build 2023-03-30 22:04:58 +02:00
Kruglov Pavel
a3908b54c1
Merge pull request #48124 from Avogar/msgpack-more-types
Support more ClickHouse types in MsgPack format
2023-03-30 22:03:47 +02:00
Alexey Milovidov
5146dc0c53
Merge pull request #48199 from ClickHouse/qoega-patch-4
Update style in ParserKQLSort.cpp
2023-03-30 22:58:20 +03:00
Alexey Milovidov
614be6f718
Merge pull request #47387 from sippy/pg_select_from_only
Use "SELECT * FROM ONLY xyz", not "SELECT * FROM xyz" while replicating
2023-03-30 22:57:57 +03:00
Alexey Milovidov
eb38616cc9
Merge pull request #48214 from ClickHouse/remove-wrong-assert
Remove wrong assert from LogicalExpressionOptimizerPass
2023-03-30 22:55:24 +03:00
Nikolai Kochetov
afa3052565
Update ExecutingGraph.cpp 2023-03-30 21:33:33 +02:00
Nikolai Kochetov
fae8d7a1ee
Merge pull request #48221 from ClickHouse/fix-aggregate-projection-analysis
Disable AST optimizations for projection analysis.
2023-03-30 21:31:58 +02:00
Kruglov Pavel
d096da0cfd
Merge branch 'master' into bson-more-types 2023-03-30 21:18:10 +02:00
avogar
35937adcaa Support more types in CapnProto format 2023-03-30 19:15:28 +00:00
Alexey Milovidov
6e3ced86e9
Merge pull request #48220 from ClickHouse/rs/caseinsensitive-str_to_date
MySQL compatibility: Make str_to_date alias case-insensitive
2023-03-30 22:08:01 +03:00
Alexander Tokmakov
d12bab3ce1 add zk retries for distributed ddl 2023-03-30 20:47:25 +02:00
Azat Khuzhin
edeeac84cf Fix incorrect ThreadPool usage after ThreadPool introspection
```
$ gg 'ThreadPool[^()]([A-Za-z_]\+,' src/
src/Interpreters/Context.cpp:        shared->load_marks_threadpool = std::make_unique<ThreadPool>(pool_size, pool_size, queue_size);
src/Interpreters/Context.cpp:        shared->prefetch_threadpool = std::make_unique<ThreadPool>(pool_size, pool_size, queue_size);
src/Interpreters/Context.cpp:        shared->threadpool_writer = std::make_unique<ThreadPool>(pool_size, pool_size, queue_size);
```

Fixes: #47880
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-30 20:08:38 +02:00
Robert Schulze
4938681f87
Fix macos build 2023-03-30 17:46:11 +00:00
Robert Schulze
191f780223
Sort output of SHOW PROCESSLIST
Follow-up to #48127
2023-03-30 17:22:20 +00:00
Mikhail f. Shiryaev
c5ec7a3ec9
Merge pull request #48235 from ClickHouse/fix-01293_show_clusters
Determine the hosts order in `SHOW CLUSTER` query
2023-03-30 18:41:56 +02:00
Yakov Olkhovskiy
2ca77b13fe
Merge branch 'master' into imp-use-structure-from-insertion 2023-03-30 12:23:12 -04:00
Antonio Andelic
80cb121d2a
Merge pull request #48092 from ClickHouse/nosign-keyword-for-s3
Add support for `NOSIGN` keyword and `no_sign_request` config for S3
2023-03-30 18:10:56 +02:00
Nikolai Kochetov
c71deea9aa
Update src/Processors/Executors/ExecutingGraph.cpp
Co-authored-by: Sergei Trifonov <sergei@clickhouse.com>
2023-03-30 18:05:42 +02:00
Nikolai Kochetov
f06bdc85eb
Merge pull request #48226 from ClickHouse/rename-setting-stop_reading_on_first_cancel
Rename setting stop_reading_on_first_cancel
2023-03-30 18:03:23 +02:00
Mikhail f. Shiryaev
9593ffc7cb
Determine the hosts order in SHOW CLUSTER query 2023-03-30 17:37:31 +02:00
Nikolay Degterinsky
c363b5820e
Merge pull request #47087 from evillique/decode_ulid
Add function ULIDStringToDateTime
2023-03-30 17:19:07 +02:00
Nikolai Kochetov
66f546ef70 Do not partially cancel processors which were added from expand pipeline. 2023-03-30 15:02:12 +00:00
filimonov
fbb22348ea
Refactor reading the pool setting & from server config. (#48055)
After #36425 there was a lot of confusions/problems with configuring pools - when the message was confusing, and settings need to be ajusted in several places.
See some examples in #44251, #43351, #47900, #46515.

The commit includes the following changes:
1) Introduced a unified mechanism for reading pool sizes from the configuration file(s). Previously, pool sizes were read from the Context.cpp with fallbacks to profiles, whereas main_config_reloader in Server.cpp read them directly without fallbacks.
2) Corrected the data type for background_merges_mutations_concurrency_ratio. It should be float instead of int.
3) Refactored the default values for settings. Previously, they were defined in multiple places throughout the codebase, but they are now defined in one place (or two, to be exact: Settings.h and ServerSettings.h).
4) Improved documentation, including the correct message in system.settings.

Additionally make the code more conform with #46550.
2023-03-30 16:44:11 +02:00
Alexander Tokmakov
131395b00f
Merge pull request #48171 from aalexfvk/add_option_disable_on_cluster_queries
Add allow_distributed_ddl_queries option to the cluster config
2023-03-30 17:29:02 +03:00
Robert Schulze
1b709d0bc0
Merge branch 'master' into rs/caseinsensitive-str_to_date 2023-03-30 16:23:18 +02:00
Robert Schulze
9cf45e5436
Merge branch 'master' into rs/no-default-format-string 2023-03-30 16:23:14 +02:00
Anton Popov
e72472e71b
Merge branch 'master' into fix-race-storage-s3 2023-03-30 16:19:57 +02:00
Nikolai Kochetov
a8a28bdf3d Merge branch 'master' into rename-setting-stop_reading_on_first_cancel 2023-03-30 16:07:14 +02:00
Nikolai Kochetov
f870e6f7a9 Rename setting stop_reading_on_first_cancel to partial_result_on_first_cancel. 2023-03-30 14:00:44 +00:00
Yakov Olkhovskiy
79a8bf7375
Merge branch 'master' into imp-use-structure-from-insertion 2023-03-30 09:12:10 -04:00
Robert Schulze
8b2fc8a40a
parseDateTime[InJodaSyntax](): Require format argument
Function parseDateTime[InJodaSyntax]() previously accepted an
(undocumented) default format string. The problem was that
1. there is no "natural" default format
2. MySQL str_to_date() (= the motivation for
   parseDateTime[InJodaSyntax]()) also provides no default format.

--> get rid of the default format
2023-03-30 12:25:55 +00:00
Nikolai Kochetov
ad246d669e Disable AST optimizations for projection analysis. 2023-03-30 12:08:52 +00:00
Robert Schulze
2df32324af
MySQL compatibility: Make str_to_date alias case-insensitive
MySQL doesn't care about the case
2023-03-30 12:06:20 +00:00
Alexander Tokmakov
681d5b25bf
Merge pull request #48208 from ClickHouse/remove-unused-setting
Remove unused setting
2023-03-30 15:02:44 +03:00
Nikolai Kochetov
b3d77c0c30
Merge pull request #48177 from ClickHouse/deprecate-explain-query-tree-with-disabled-analyzer
Deprecate EXPLAIN QUERY TREE with disabled analyzer.
2023-03-30 13:56:40 +02:00
Alexey Milovidov
cb27416d8e
Merge pull request #48102 from ClickHouse/vdimir/25402_storage_merge_explain_graph_crash
Fix crash in explain graph with StorageMerge
2023-03-30 13:54:22 +03:00
Antonio Andelic
b22d3e9136 Remove wrong assert 2023-03-30 10:21:48 +00:00
Alexey Milovidov
103972497b Remove unused setting 2023-03-30 12:07:56 +02:00
taiyang-li
e3f4089f3b fix bugs 2023-03-30 18:00:38 +08:00
Ilya Yatsishin
baabc49f33
Update ParserKQLSort.cpp
Style
2023-03-30 11:01:51 +02:00
Robert Schulze
8354f6d489
Merge branch 'master' into rs/m 2023-03-30 10:56:21 +02:00
Robert Schulze
b0473098c6
Merge branch 'master' into qc-compression 2023-03-30 10:55:42 +02:00
Robert Schulze
47fd1ee06d
Merge pull request #48127 from ClickHouse/rs/sort-show
Sort output of SHOW <INFO> statements
2023-03-30 10:54:23 +02:00
Robert Schulze
d24d1b48df
Merge branch 'master' into varuint-v2 2023-03-30 10:24:58 +02:00
Antonio Andelic
a307e0d95d
Merge pull request #48168 from ClickHouse/logical-optimizer-ignore-nulls
Correctly handle NULL constants in logical optimizer for new analyzer
2023-03-30 10:24:25 +02:00
Alexey Milovidov
50bdea3c76 Fix bug in aggregate functions JIT 2023-03-30 09:57:17 +02:00
Nikolay Degterinsky
8c8c746451
Update FunctionsCodingULID.cpp 2023-03-30 09:04:36 +02:00
Nikolay Degterinsky
870ee4b4f5
Merge pull request #47813 from FrankChen021/query_id
Add `X-ClickHouse-Query-Id` to HTTP response when queries fail to execute
2023-03-30 09:00:03 +02:00
Antonio Andelic
9db58532f4
Clang-tidy fix 2023-03-30 08:41:14 +02:00
Alexey Milovidov
5ca488d70e
Update src/Processors/Formats/Impl/MsgPackRowInputFormat.cpp
Co-authored-by: Antonio Andelic <antonio2368@users.noreply.github.com>
2023-03-30 09:14:52 +03:00
Dmitrii Kovalkov
c984526288 Move functions registration to .cpp 2023-03-30 06:24:18 +03:00
Dmitrii Kovalkov
c82b1d2b59 Move FunctionsJSON.cpp -> .h 2023-03-30 06:24:18 +03:00
taiyang-li
e43780326e wip support map args for map_from_arrays 2023-03-30 11:09:07 +08:00
Nikolay Degterinsky
1bc5489e04
Merge pull request #47895 from evillique/fix-isipv6-function
Fix isIPv6String function
2023-03-30 01:45:08 +02:00
Nikolay Degterinsky
5b53f5ddae
Merge branch 'master' into decode_ulid 2023-03-30 01:37:14 +02:00
Alexey Milovidov
a629fa3ed9
Merge pull request #48162 from ClickHouse/vdimir/remove_unused_from_gtest_transform_query
Remove unused mockSystemDatabase from gtest_transform_query_for_exter…
2023-03-30 01:29:42 +03:00
Alexey Milovidov
e982fb9f1c
Merge pull request #47880 from azat/threadpool-introspection
ThreadPool metrics introspection
2023-03-30 01:27:31 +03:00
Alexey Milovidov
c00a2fc851
Merge pull request #48184 from Avogar/fix-avro
Fix possible member call on null pointer in Avro format
2023-03-30 01:19:44 +03:00
Anton Popov
ed29c141fb fix race in StorageS3 2023-03-29 22:13:45 +00:00
Vitaly Baranov
42c2ccb7cc Support BACKUP ALL command. 2023-03-30 00:11:13 +02:00
Nikita Taranov
460a83feb6
Fix aggregation by partitions (#47634) 2023-03-29 23:59:39 +02:00
Alexey Milovidov
13761fe891
Merge pull request #48133 from ClickHouse/allow-to-skip-errors-of-enums
Allow skipping errors related to unknown enum values in row input formats
2023-03-29 23:20:05 +03:00
Alexander Gololobov
98b3617ce2
Merge pull request #48150 from DimasKovas/fix_stdlib_compatibility
Fix stdlib compatibility issues
2023-03-29 21:29:33 +02:00
avogar
db83dd4e52 Fix possible member call on null pointer in Avro format 2023-03-29 17:33:22 +00:00
Aleksei Filatov
0ac9dcd723 Add allow_distributed_ddl_queries option to the cluster config 2023-03-29 18:15:46 +03:00
Nikolai Kochetov
85795965c0 Deprecate EXPLAIN QUERY TREE with disabled analyzer. 2023-03-29 14:59:01 +00:00
Alexey Milovidov
cc345853e7
Merge pull request #47594 from ClickHouse/decimal256-various
Add specializations for Decimal256 in various places
2023-03-29 17:33:20 +03:00
Frank Chen
87d235e842
Some improvements about names of span logs (#47667) 2023-03-29 16:28:36 +02:00
Yakov Olkhovskiy
739c20abdd clang issue, test 2023-03-29 14:05:31 +00:00
Alexander Tokmakov
c5b6ed410d
Merge pull request #48130 from ClickHouse/support_undrop_table
Merging "Support undrop table"
2023-03-29 16:49:58 +03:00
Vitaly Baranov
481a7a76ac
Simplify backup coordination for file infos (#48095)
* Remove obsolete code for archive suffixes.

* Simplify backup coordination, stop using it for restoring.

* Build all file infos before writing to backup. Decrease number of znodes.

* Split long values before writing to ZooKeeper.

* Use separate mutexes for unrelated activities.

* Make test test_disallow_concurrency less flaky.

* Add comments and test for backup_keeper_value_max_size.
2023-03-29 15:19:40 +02:00
Robert Schulze
b324d0ed5e
Merge branch 'master' into qc-compression 2023-03-29 15:09:22 +02:00
Antonio Andelic
80f0251ff2 better 2023-03-29 12:54:57 +00:00
Antonio Andelic
611e7c6382 Ignore null constants in logical optimizer 2023-03-29 12:37:43 +00:00
Antonio Andelic
44e95aa65f Merge branch 'master' into nosign-keyword-for-s3 2023-03-29 11:10:03 +00:00
Antonio Andelic
7b1ad221b2 Address PR comments 2023-03-29 11:08:44 +00:00
robot-ch-test-poll
04d30a2afb
Merge pull request #48119 from Avogar/avro-more-types
Support more ClickHouse types in Avro format
2023-03-29 13:07:35 +02:00
vdimir
bdc8a47bcf
Remove unused mockSystemDatabase from gtest_transform_query_for_external_database 2023-03-29 11:02:50 +00:00
Azat Khuzhin
d7d9f0cb6b Fix overflow of VarUInt format in Progress packets
Otherwise query like this, can trigger sanity check:

    WITH x AS (SELECT [], number AS a FROM numbers(9223372036854775807)), y AS (SELECT arrayLastOrNull(x -> (x >= -inf), []), arrayLastOrNull(x -> (x >= NULL), [1]), number AS a FROM numbers(1.)) SELECT [1023], * FROM x WHERE a IN (SELECT a FROM y) ORDER BY arrayLastOrNull(x -> (x >= 1025), [1048577, 1048576]) DESC NULLS LAST, '0.0000000002' ASC NULLS LAST, a DESC NULLS FIRST

CI: https://s3.amazonaws.com/clickhouse-test-reports/0/a9bcd022d5f4a5be530595dbfae3ed177b5c1972/fuzzer_astfuzzermsan/report.html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-29 12:42:45 +02:00
Robert Schulze
d0f4c63d27
Fix tests 2023-03-29 10:30:40 +00:00
Kseniia Sumarokova
9e8bbe4bfe
Merge pull request #47987 from kssenii/try-fix-rabbitmq-test
Try fix rabbitmq test
2023-03-29 12:20:05 +02:00
Vladimir C
570426141e
Merge branch 'master' into vdimir/direct-dict-async-read 2023-03-29 11:58:08 +02:00
vdimir
588fdcffdf
comment child_plans in ReadFromMerge 2023-03-29 09:42:32 +00:00
Dmitrii Kovalkov
71a6a02e88 fix stdlib compatibility issues 2023-03-29 12:20:27 +03:00
Azat Khuzhin
9457b1cc46 Use VAR_UINT_MAX for unknown_packet_in_send_data
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-29 11:02:33 +02:00
Azat Khuzhin
36f6408ada Add sanity checks for writing number in variable length format
And just to double check:

    # var_uint 9223372036854775807
    ffffffffffffffff7f
    ffffffffffffffff7f
    ffffffffffffffff7f
    x: 9223372036854775807, y: 9223372036854775807
    # var_uint 9223372036854775808
    808080808080808080
    808080808080808080
    808080808080808080
    x: 9223372036854775808, y: 0

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-29 11:02:33 +02:00
Azat Khuzhin
f38a7aeabe ThreadPool metrics introspection
There are lots of thread pools and simple local-vs-global is not enough
already, it is good to know which one in particular uses threads.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-29 10:46:59 +02:00
Robert Schulze
b4c8ef980c
Merge pull request #47838 from zvonand/zvonand-formatdecimal
Add toDecimalString function
2023-03-29 10:41:12 +02:00
save-my-heart
167757746f
Merge branch 'master' into throw_non_parametric_function 2023-03-29 16:15:11 +08:00
Antonio Andelic
50ed205aa0
Merge pull request #47303 from ClickHouse/avoid-merging-partition
Skip merged partitions for `min_age_to_force_merge_seconds` merges
2023-03-29 09:31:00 +02:00
robot-ch-test-poll1
decc4fbc98
Merge pull request #48132 from ClickHouse/fix-double-whitespace-2
Fix double whitespace in exception message
2023-03-29 08:06:31 +02:00
Sema Checherinda
1031e2001b fix build 2023-03-29 07:41:31 +02:00
Yakov Olkhovskiy
211fa2117c clang wants it 2023-03-29 03:50:21 +00:00
Alexander Tokmakov
cfe0fb6571 fix 2023-03-29 03:31:39 +02:00
Sergei Trifonov
1ff6519c25
Merge branch 'master' into segmentator-fix 2023-03-29 02:29:43 +02:00
serxa
81af0b6deb avoid counters updates if not initialized 2023-03-29 00:29:21 +00:00
Alexey Milovidov
f7c855965d
Merge pull request #48112 from ClibMouse/s390x_reinterpretAsFloat64
s390x reinterpret as float64
2023-03-29 02:09:43 +03:00
Alexey Milovidov
cfc4e40811 Allow skipping errors related to unknown enum values in row input formats 2023-03-29 00:31:53 +02:00
Alexey Milovidov
42335c5f1e Fix double whitespace in exception message 2023-03-29 00:15:20 +02:00
Alexander Tokmakov
53725bdea1 monor improvements 2023-03-28 23:47:45 +02:00
Robert Schulze
12559236ee
Another style fix 2023-03-28 21:01:59 +00:00
Robert Schulze
6f8a450805
Sort output of SHOW <INFO> statements
Sorting is strictly speaking not necessary, but
1. sorted output is more user-friendly,
2. SQL currently does not allow to sort the output of SHOW <INFO>
   otherwise, e.g. SELECT * FROM (SHOW <INFO> ...) ORDER BY is rejected.
3. SQL tests can take advantage of that.
2023-03-28 20:55:59 +00:00
Alexander Tokmakov
614f8b313e
Merge pull request #47856 from Algunenano/zk_inject_timeout
Allow injecting timeout errors on Keeper
2023-03-28 23:40:51 +03:00
Robert Schulze
622d1dfadd
Merge pull request #46252 from ClibMouse/feature/hastokencaseinsensitive-index-utilization
Implement tokenbf_v1 index utilization for hasTokenCaseInsensitive
2023-03-28 22:38:21 +02:00
Igor Nikonov
6733a85d25 Fixes 2023-03-28 20:26:21 +00:00
avogar
8740b201f1 Fix 2023-03-28 20:07:59 +00:00
Robert Schulze
6c84eabb79
Fix stylecheck 2023-03-28 20:07:26 +00:00
Robert Schulze
e743f840f0
Fix taipos 2023-03-28 20:05:17 +00:00
Alexander Tokmakov
a1076005c7 Merge branch 'master' into support_undrop_table 2023-03-28 22:03:31 +02:00
avogar
bc56c02858 Support more ClickHouse types in ORC/Arrow/Parquet formats 2023-03-28 20:02:42 +00:00
Yakov Olkhovskiy
9201e7d393
Merge pull request #47371 from HarryLeeIBM/hlee-s390x-hash-tuples
Fix hashing tuples for s390x
2023-03-28 15:19:37 -04:00
avogar
2321530bb0 Fix 2023-03-28 18:50:30 +00:00
Kruglov Pavel
3fb1a10a16
Fix style 2023-03-28 20:49:10 +02:00
avogar
a0fcf81abf Support more ClickHouse types in MsgPack format 2023-03-28 18:25:52 +00:00
Robert Schulze
202f52dc3a
Implement SHOW COLUMNS
Modeled after (*)

Fixes #46437

(*) https://dev.mysql.com/doc/refman/8.0/en/show-columns.html
2023-03-28 18:04:22 +00:00
avogar
04770cd444 Better 2023-03-28 17:58:29 +00:00
avogar
e7ff6e85c2 Support Enum output/input in BSONEachRow, allow all map key types and avoid extra calculations 2023-03-28 17:57:23 +00:00
avogar
06a6f5cf76 Support more ClickHouse types in Avro format 2023-03-28 17:36:20 +00:00
Anton Popov
1e79245b94 add tests 2023-03-28 17:20:05 +00:00
robot-ch-test-poll3
19c73afda4
Merge pull request #48098 from kssenii/materialized-pg-small-fix
materialized pg small fix
2023-03-28 19:13:10 +02:00
Kruglov Pavel
f3c594a160
Merge pull request #48057 from Avogar/fix-avro-records
Use uniq names for Records in Avro to avoid reusing its schema
2023-03-28 19:12:41 +02:00
Yakov Olkhovskiy
a03bf8568a implement use_structure_from_insertion_table_in_table_functions=auto 2023-03-28 17:03:35 +00:00
Anton Popov
6d05968a0f optimize function mapUpdate 2023-03-28 16:47:14 +00:00
natasha
e984e221ce get rid of std::stringstream 2023-03-28 17:21:55 +01:00
natasha
d7d008c44d fix typo in hilite_none 2023-03-28 17:21:55 +01:00
natasha
ba17db5365 fix ASTCreateQuery test 2023-03-28 17:21:55 +01:00
natasha
f36ad31751 add bug: second parenthesis ) not hilited in CREATE TABLE name AS (SELECT *) COMMENT 'hello' 2023-03-28 17:21:55 +01:00
natasha
5681f2c130 remove unused compare std::stringstream overload 2023-03-28 17:21:55 +01:00
natasha
df5824a2d2 contstruct string directly without std::stringstream in tests 2023-03-28 17:21:55 +01:00
natasha
a7614b844e rename const char * it into ptr 2023-03-28 17:21:54 +01:00
natasha
36ef622853 change compare signature to accept both args as String, for symmetry 2023-03-28 17:21:54 +01:00
natasha
e14675935a remove const& from std::string_view 2023-03-28 17:21:54 +01:00
natasha
a862973f14 amend comment on hilite equality 2023-03-28 17:21:54 +01:00
natasha
cf057013ed hilite view()'s parenthesis as function as well 2023-03-28 17:21:54 +01:00
natasha
a4dfba11c5 replace std::string with String 2023-03-28 17:21:54 +01:00
natasha
ddfc72a6ca use () for c-tor, not {} 2023-03-28 17:21:53 +01:00
natasha
134ec0f6b0 remove const& from std::string_view 2023-03-28 17:21:53 +01:00
natasha
95a8905be6 split ostr writes for readability 2023-03-28 17:21:53 +01:00
natasha
9e8ad944d6 fix symmetry 2023-03-28 17:21:53 +01:00
natasha
bf4a3a23fa compare string without hilites first, for easier debug 2023-03-28 17:21:53 +01:00
natasha
ed22d0f028 fix bugs (now tests pass) 2023-03-28 17:21:53 +01:00
natasha
da5285004d add failing tests 2023-03-28 17:21:53 +01:00
natasha
086fe077c9 cleanup 2023-03-28 17:21:53 +01:00
natasha
103bb9bf03 add a hilite-aware equality comparator and a sample test 2023-03-28 17:21:53 +01:00
save-my-heart
cea631a4c2 throw exception while non-parametric functions having parameters 2023-03-28 23:24:07 +08:00
Sema Checherinda
b774310dc9 keep query id for logging when optimize query 2023-03-28 16:44:47 +02:00
Suzy Wang
29d640aa48 s390x reinterpret as float64 2023-03-28 07:11:21 -07:00
Igor Nikonov
259df04415 Merge remote-tracking branch 'origin/master' into decimal256-various 2023-03-28 13:36:53 +00:00
Sema Checherinda
10f1030a14
Merge pull request #47147 from aletik256/fix_JSON_searchField
fix_JSON_searchField
2023-03-28 14:45:09 +02:00
zvonand
79f06ddfef style fix 2023-03-28 13:58:37 +02:00
Kruglov Pavel
292539b90e
Merge pull request #47981 from kssenii/better-delegate-disks-handle-mutual-path
Fix case when (optional) path is not added to encrypted disk configuration
2023-03-28 13:52:50 +02:00
zvonand
edc80fbd94 updated docs + fix linker isssue 2023-03-28 13:25:18 +02:00
Raúl Marín
bffde5e476 Merge remote-tracking branch 'blessed/master' into unnecessary_alter_checks 2023-03-28 13:17:36 +02:00
vdimir
7a85974c35
Fix crash in explain graph with StorageMerge 2023-03-28 11:04:07 +00:00
Vladimir C
d32c285d17
Merge branch 'master' into vdimir/direct-dict-async-read 2023-03-28 12:41:20 +02:00
kssenii
943a4f75f8 Catch all exceptions to avoid replication stuck 2023-03-28 12:00:56 +02:00
Alexey Milovidov
1c3b692bdb
Merge pull request #47958 from arthurpassos/add_unit_test_assert_chunked_array_with_no_chunks_does_not_abort
Add unit test to assert arrow lib does not abort on fatal logs
2023-03-28 12:56:18 +03:00
kssenii
57226fcb25 Review fixes 2023-03-28 11:43:15 +02:00
Antonio Andelic
6f1e50598a fix test 2023-03-28 09:32:23 +00:00
Kseniia Sumarokova
62c6aea45b
Merge pull request #47975 from MikhailBurdukov/mburdukov_ignore_inacc_tables
Skip materialized view checking if source table does not exist
2023-03-28 11:29:11 +02:00
SmitaRKulkarni
98999c2afb
Merge pull request #48065 from ClickHouse/Support_parameterized_view_with_cte
Support for cte in parameterized views
2023-03-28 11:18:16 +02:00
zvonand
09181a9b58 Merge branch 'master' of github.com:ClickHouse/ClickHouse into zvonand-formatdecimal 2023-03-28 11:01:00 +02:00
zvonand
406e654b00 removed unnecessary imports 2023-03-28 10:56:04 +02:00
Robert Schulze
91f3edd923
Merge pull request #47967 from jrdi/fix-wide-integer-m1
Fix compilation on MacOS
2023-03-28 10:53:29 +02:00
Robert Schulze
37effb4fa2
Merge remote-tracking branch 'origin/master' into rs/m 2023-03-28 08:51:12 +00:00
Vladimir C
5fa519d043
Merge pull request #48047 from ClickHouse/vdimir/max_number_of_mutatuins_for_replica 2023-03-28 10:50:35 +02:00
Robert Schulze
30444376b0
Follow-up to #47838 2023-03-28 08:47:15 +00:00
zvonand
c64e9bd233 fix style 2023-03-28 10:31:52 +02:00
Antonio Andelic
1605afe647 Fix test 2023-03-28 08:12:21 +00:00
Robert Schulze
7cf494acc2
Merge pull request #48000 from ClickHouse/rs/parsedatetimeorzero
MySQL dialect compat: Add str_to_date
2023-03-28 10:04:56 +02:00
Antonio Andelic
0b5fd2140a Merge branch 'master' into cnf-new-analyzer 2023-03-28 07:57:12 +00:00
Antonio Andelic
30e4ee705a Better 2023-03-28 07:54:23 +00:00
Antonio Andelic
ac8dd527dc Address PR comments 2023-03-28 07:49:34 +00:00
Antonio Andelic
a3b6d43212
Merge branch 'master' into avoid-merging-partition 2023-03-28 09:40:36 +02:00
Antonio Andelic
d2c1d16e29 Merge branch 'master' into custom-key-new-analyzer 2023-03-28 07:24:29 +00:00
Antonio Andelic
a0b6cd63bb fix build 2023-03-28 07:23:29 +00:00