From ff1fad85216c0212520278075a1fbaea992688b6 Mon Sep 17 00:00:00 2001 From: Vitaly Baranov Date: Mon, 23 Aug 2021 08:57:00 +0300 Subject: [PATCH] Use setSetting() with implicit conversion true/false -> Field. --- src/DataStreams/PushingToViewsBlockOutputStream.cpp | 2 +- src/Dictionaries/ExecutablePoolDictionarySource.cpp | 2 +- src/Server/TCPHandler.cpp | 2 +- src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp | 4 ++-- src/Storages/RabbitMQ/StorageRabbitMQ.cpp | 2 +- src/Storages/StorageMerge.cpp | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/DataStreams/PushingToViewsBlockOutputStream.cpp b/src/DataStreams/PushingToViewsBlockOutputStream.cpp index dec5b710f75..4a7ef67f012 100644 --- a/src/DataStreams/PushingToViewsBlockOutputStream.cpp +++ b/src/DataStreams/PushingToViewsBlockOutputStream.cpp @@ -70,7 +70,7 @@ PushingToViewsBlockOutputStream::PushingToViewsBlockOutputStream( // Do not deduplicate insertions into MV if the main insertion is Ok if (disable_deduplication_for_children) - insert_context->setSetting("insert_deduplicate", Field{false}); + insert_context->setSetting("insert_deduplicate", false); // Separate min_insert_block_size_rows/min_insert_block_size_bytes for children if (insert_settings.min_insert_block_size_rows_for_materialized_views) diff --git a/src/Dictionaries/ExecutablePoolDictionarySource.cpp b/src/Dictionaries/ExecutablePoolDictionarySource.cpp index e18664e477c..41067016ce4 100644 --- a/src/Dictionaries/ExecutablePoolDictionarySource.cpp +++ b/src/Dictionaries/ExecutablePoolDictionarySource.cpp @@ -297,7 +297,7 @@ void registerDictionarySourceExecutablePool(DictionarySourceFactory & factory) /** Currently parallel parsing input format cannot read exactly max_block_size rows from input, * so it will be blocked on ReadBufferFromFileDescriptor because this file descriptor represent pipe that does not have eof. */ - context->setSetting("input_format_parallel_parsing", Field{false}); + context->setSetting("input_format_parallel_parsing", false); String settings_config_prefix = config_prefix + ".executable_pool"; diff --git a/src/Server/TCPHandler.cpp b/src/Server/TCPHandler.cpp index b2db65e22bc..10e273fbe66 100644 --- a/src/Server/TCPHandler.cpp +++ b/src/Server/TCPHandler.cpp @@ -1267,7 +1267,7 @@ void TCPHandler::receiveQuery() /// compatibility. if (query_kind == ClientInfo::QueryKind::SECONDARY_QUERY) { - query_context->setSetting("normalize_function_names", Field(0)); + query_context->setSetting("normalize_function_names", false); } } diff --git a/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp b/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp index b6d55828e85..84be8012509 100644 --- a/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp +++ b/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp @@ -1211,8 +1211,8 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMergerMutator::mutatePartToTempor context_for_reading->setSetting("max_streams_to_max_threads_ratio", 1); context_for_reading->setSetting("max_threads", 1); /// Allow mutations to work when force_index_by_date or force_primary_key is on. - context_for_reading->setSetting("force_index_by_date", Field(0)); - context_for_reading->setSetting("force_primary_key", Field(0)); + context_for_reading->setSetting("force_index_by_date", false); + context_for_reading->setSetting("force_primary_key", false); MutationCommands commands_for_part; for (const auto & command : commands) diff --git a/src/Storages/RabbitMQ/StorageRabbitMQ.cpp b/src/Storages/RabbitMQ/StorageRabbitMQ.cpp index 44622f106f4..419071ba642 100644 --- a/src/Storages/RabbitMQ/StorageRabbitMQ.cpp +++ b/src/Storages/RabbitMQ/StorageRabbitMQ.cpp @@ -196,7 +196,7 @@ String StorageRabbitMQ::getTableBasedName(String name, const StorageID & table_i std::shared_ptr StorageRabbitMQ::addSettings(ContextPtr local_context) const { auto modified_context = Context::createCopy(local_context); - modified_context->setSetting("input_format_skip_unknown_fields", Field{true}); + modified_context->setSetting("input_format_skip_unknown_fields", true); modified_context->setSetting("input_format_allow_errors_ratio", 0.); modified_context->setSetting("input_format_allow_errors_num", rabbitmq_settings->rabbitmq_skip_broken_messages.value); diff --git a/src/Storages/StorageMerge.cpp b/src/Storages/StorageMerge.cpp index ed203db1a35..4e50b78ea8e 100644 --- a/src/Storages/StorageMerge.cpp +++ b/src/Storages/StorageMerge.cpp @@ -209,7 +209,7 @@ Pipe StorageMerge::read( * since there is no certainty that it works when one of table is MergeTree and other is not. */ auto modified_context = Context::createCopy(local_context); - modified_context->setSetting("optimize_move_to_prewhere", Field{false}); + modified_context->setSetting("optimize_move_to_prewhere", false); /// What will be result structure depending on query processed stage in source tables? Block header = getHeaderForProcessingStage(*this, column_names, metadata_snapshot, query_info, local_context, processed_stage);