Review fixes

This commit is contained in:
kssenii 2023-03-17 13:56:02 +01:00
parent bb0beb7449
commit d7b2ea60eb
2 changed files with 4 additions and 4 deletions

View File

@ -61,7 +61,7 @@ namespace
} }
auto value = literal_value->as<ASTLiteral>()->value; auto value = literal_value->as<ASTLiteral>()->value;
return std::pair{key, value}; return std::pair{key, Field(value)};
} }
} }
@ -85,7 +85,7 @@ MutableNamedCollectionPtr tryGetNamedCollectionWithOverrides(
for (auto * it = std::next(asts.begin()); it != asts.end(); ++it) for (auto * it = std::next(asts.begin()); it != asts.end(); ++it)
{ {
auto value_override = getKeyValueFromAST(*it, complex_args != nullptr, context); auto value_override = getKeyValueFromAST(*it, /* fallback_to_ast_value */complex_args != nullptr, context);
if (!value_override && !(*it)->as<ASTFunction>()) if (!value_override && !(*it)->as<ASTFunction>())
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Expected key-value argument or function"); throw Exception(ErrorCodes::BAD_ARGUMENTS, "Expected key-value argument or function");

View File

@ -102,8 +102,8 @@ void registerStorageExternalDistributed(StorageFactory & factory)
"engine_name, named_collection and/or description"); "engine_name, named_collection and/or description");
auto context = args.getLocalContext(); auto context = args.getLocalContext();
[[maybe_unused]] const auto & settings = context->getSettingsRef(); const auto & settings = context->getSettingsRef();
size_t max_addresses = context->getSettingsRef().glob_expansion_max_elements; size_t max_addresses = settings.glob_expansion_max_elements;
auto get_addresses = [&](const std::string addresses_expr) auto get_addresses = [&](const std::string addresses_expr)
{ {
return parseRemoteDescription(addresses_expr, 0, addresses_expr.size(), ',', max_addresses); return parseRemoteDescription(addresses_expr, 0, addresses_expr.size(), ',', max_addresses);