Update CassandraDictionarySource.cpp

This commit is contained in:
Kseniia Sumarokova 2022-03-18 14:04:14 +01:00 committed by GitHub
parent 5f0fdd64fe
commit 4a464d18be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,9 +25,10 @@ void registerDictionarySourceCassandra(DictionarySourceFactory & factory)
#if USE_CASSANDRA
setupCassandraDriverLibraryLogging(CASS_LOG_INFO);
global_context->getRemoteHostFilter().checkHostAndPort(config.getString(config_prefix + ".host"), toString(config.getUInt(config_prefix + ".port", 0)));
auto source_config_prefix = config_prefix + ".cassandra";
global_context->getRemoteHostFilter().checkHostAndPort(config.getString(source_config_prefix + ".host"), toString(config.getUInt(source_config_prefix + ".port", 0)));
return std::make_unique<CassandraDictionarySource>(dict_struct, config, config_prefix + ".cassandra", sample_block);
return std::make_unique<CassandraDictionarySource>(dict_struct, config, source_config_prefix, sample_block);
#else
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED,
"Dictionary source of type `cassandra` is disabled because ClickHouse was built without cassandra support.");