mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 19:12:03 +00:00
Review suggestions
This commit is contained in:
parent
a893f75884
commit
c6fc31c1e3
@ -63,18 +63,13 @@ bool ServerType::shouldStart(Type server_type, const std::string & server_custom
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
auto is_type_custom = [](Type current_type)
|
|
||||||
{
|
|
||||||
return current_type == Type::CUSTOM;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (exclude_types.contains(Type::QUERIES_ALL))
|
if (exclude_types.contains(Type::QUERIES_ALL))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (exclude_types.contains(Type::QUERIES_DEFAULT) && is_type_default(server_type))
|
if (exclude_types.contains(Type::QUERIES_DEFAULT) && is_type_default(server_type))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (exclude_types.contains(Type::QUERIES_CUSTOM) && is_type_custom(server_type))
|
if (exclude_types.contains(Type::QUERIES_CUSTOM) && server_type == Type::CUSTOM)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (exclude_types.contains(server_type))
|
if (exclude_types.contains(server_type))
|
||||||
@ -93,7 +88,7 @@ bool ServerType::shouldStart(Type server_type, const std::string & server_custom
|
|||||||
return is_type_default(server_type);
|
return is_type_default(server_type);
|
||||||
|
|
||||||
if (type == Type::QUERIES_CUSTOM)
|
if (type == Type::QUERIES_CUSTOM)
|
||||||
return is_type_custom(server_type);
|
return server_type == Type::CUSTOM;
|
||||||
|
|
||||||
if (type == Type::CUSTOM)
|
if (type == Type::CUSTOM)
|
||||||
return server_type == type && server_custom_name == custom_name;
|
return server_type == type && server_custom_name == custom_name;
|
||||||
|
Loading…
Reference in New Issue
Block a user