mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-29 05:00:47 +00:00
Fix build and style
This commit is contained in:
parent
842a31be8b
commit
3987a45ea2
@ -111,7 +111,8 @@ void buildLayoutConfiguration(
|
||||
void buildRangeConfiguration(AutoPtr<Document> doc, AutoPtr<Element> root, const ASTDictionaryRange * range)
|
||||
{
|
||||
// appends <key><name>value</name></key> to root
|
||||
auto appendElem = [&doc, &root](const std::string & key, const std::string & value) {
|
||||
auto appendElem = [&doc, &root](const std::string & key, const std::string & value)
|
||||
{
|
||||
AutoPtr<Element> element(doc->createElement(key));
|
||||
AutoPtr<Element> name(doc->createElement("name"));
|
||||
AutoPtr<Text> text(doc->createTextNode(value));
|
||||
@ -268,6 +269,9 @@ void buildPrimaryKeyConfiguration(
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
throw Exception(
|
||||
"Primary key field '" + key_name + "' not found among attributes.", ErrorCodes::INCORRECT_DICTIONARY_DEFINITION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <Common/StackTrace.h>
|
||||
#include <optional>
|
||||
#include <memory>
|
||||
#include <Poco/Mutex.h>
|
||||
|
@ -110,21 +110,21 @@ private:
|
||||
for (const auto & [name, repo_with_settings] : repositories)
|
||||
{
|
||||
const auto names = repo_with_settings.first->getAllLoadablesDefinitionNames();
|
||||
for (const auto & name : names)
|
||||
for (const auto & loadable_name : names)
|
||||
{
|
||||
auto it = loadables_infos.find(name);
|
||||
auto it = loadables_infos.find(loadable_name);
|
||||
if (it != loadables_infos.end())
|
||||
{
|
||||
LoadablesInfos & loadable_info = it->second;
|
||||
if (readLoadablesInfo(*repo_with_settings.first, name, repo_with_settings.second, loadable_info))
|
||||
if (readLoadablesInfo(*repo_with_settings.first, loadable_name, repo_with_settings.second, loadable_info))
|
||||
changed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadablesInfos loadable_info;
|
||||
if (readLoadablesInfo(*repo_with_settings.first, name, repo_with_settings.second, loadable_info))
|
||||
if (readLoadablesInfo(*repo_with_settings.first, loadable_name, repo_with_settings.second, loadable_info))
|
||||
{
|
||||
loadables_infos.emplace(name, std::move(loadable_info));
|
||||
loadables_infos.emplace(loadable_name, std::move(loadable_info));
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user