mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
Fix
This commit is contained in:
parent
61a2516c8c
commit
e9b4439a47
@ -172,8 +172,9 @@ static void validateConfigKeys(
|
||||
dict_config.keys(config_prefix, config_keys);
|
||||
for (const auto & config_key : config_keys)
|
||||
{
|
||||
if (!allowed_keys.contains(config_key))
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unexpected key `{}` in dictionary source configuration", config_key);
|
||||
if (allowed_keys.contains(config_key) || config_key.starts_with("replica"))
|
||||
continue;
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unexpected key `{}` in dictionary source configuration", config_key);
|
||||
}
|
||||
}
|
||||
|
||||
@ -205,7 +206,7 @@ std::optional<ExternalDataSourceConfiguration> getExternalDataSourceConfiguratio
|
||||
if (configuration.host.empty() || configuration.port == 0 || configuration.username.empty() || configuration.table.empty())
|
||||
{
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS,
|
||||
"Named collection of connection parameters is missing some of the parameters and dictionary parameters are added");
|
||||
"Named collection of connection parameters is missing some of the parameters and dictionary parameters are not added");
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
|
@ -388,8 +388,8 @@ def test_bad_configuration(started_cluster):
|
||||
LAYOUT(HASHED());
|
||||
''')
|
||||
|
||||
result = node1.query_and_get_error("SELECT dictGetUInt32(postgres_dict, 'value', toUInt64(1))")
|
||||
assert 'Unexpected key in config: dbbb' in result
|
||||
node1.query_and_get_error("SELECT dictGetUInt32(postgres_dict, 'value', toUInt64(1))")
|
||||
assert node1.contains_in_log('Unexpected key `dbbb`')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user