mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
codestyle fixed
This commit is contained in:
parent
ce01d0aa85
commit
cd2eac9f93
@ -229,7 +229,7 @@ void registerDictionarySourceClickHouse(DictionarySourceFactory & factory)
|
||||
bool /* check_config */) -> DictionarySourcePtr
|
||||
{
|
||||
Context context_local_copy = copyContextAndApplySettings(config_prefix, context, config);
|
||||
|
||||
|
||||
/// Note that processors are not supported yet (see constructor),
|
||||
/// hence it is not possible to override experimental_use_processors setting
|
||||
return std::make_unique<ClickHouseDictionarySource>(dict_struct, config, config_prefix + ".clickhouse", sample_block, context_local_copy);
|
||||
|
@ -84,11 +84,11 @@ DictionarySourcePtr DictionarySourceFactory::create(
|
||||
{
|
||||
Poco::Util::AbstractConfiguration::Keys keys;
|
||||
config.keys(config_prefix, keys);
|
||||
|
||||
|
||||
if (keys.empty() || keys.size() > 2)
|
||||
throw Exception{name + ": element dictionary.source should have one or two child elements",
|
||||
ErrorCodes::EXCESSIVE_ELEMENT_IN_CONFIG};
|
||||
|
||||
|
||||
const auto & source_type = keys.front();
|
||||
|
||||
const auto found = registered_sources.find(source_type);
|
||||
|
@ -53,12 +53,12 @@ void formatKeys(
|
||||
}
|
||||
|
||||
Context copyContextAndApplySettings(
|
||||
const std::string & config_prefix,
|
||||
const Context & context,
|
||||
const std::string & config_prefix,
|
||||
const Context & context,
|
||||
const Poco::Util::AbstractConfiguration & config)
|
||||
{
|
||||
Context local_context(context);
|
||||
if (config.has(config_prefix + ".settings"))
|
||||
if (config.has(config_prefix + ".settings"))
|
||||
{
|
||||
const auto prefix = config_prefix + ".settings";
|
||||
Settings settings;
|
||||
@ -66,7 +66,7 @@ Context copyContextAndApplySettings(
|
||||
settings.loadSettingsFromConfig(prefix, config);
|
||||
local_context.setSettings(settings);
|
||||
}
|
||||
|
||||
|
||||
return local_context;
|
||||
}
|
||||
|
||||
|
@ -14,8 +14,6 @@ using BlockOutputStreamPtr = std::shared_ptr<IBlockOutputStream>;
|
||||
struct DictionaryStructure;
|
||||
class Context;
|
||||
|
||||
|
||||
|
||||
/// Write keys to block output stream.
|
||||
|
||||
/// For simple key
|
||||
@ -30,8 +28,8 @@ void formatKeys(
|
||||
|
||||
/// Used for applying settings to copied context in some register[...]Source functions
|
||||
Context copyContextAndApplySettings(
|
||||
const std::string & config_prefix,
|
||||
const Context & context,
|
||||
const std::string & config_prefix,
|
||||
const Context & context,
|
||||
const Poco::Util::AbstractConfiguration & config);
|
||||
|
||||
}
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "DictionarySourceHelpers.h"
|
||||
#include "DictionaryStructure.h"
|
||||
#include "registerDictionaries.h"
|
||||
#include "DictionarySourceHelpers.h"
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user