diff --git a/dbms/src/Dictionaries/CatBoostModel.cpp b/dbms/src/Dictionaries/CatBoostModel.cpp index 2a6df227892..de948791fa3 100644 --- a/dbms/src/Dictionaries/CatBoostModel.cpp +++ b/dbms/src/Dictionaries/CatBoostModel.cpp @@ -469,7 +469,7 @@ bool CatBoostModel::isModified() const return true; } -std::unique_ptr CatBoostModel::cloneObject() const +std::unique_ptr CatBoostModel::clone() const { return std::make_unique(name, model_path, lib_path, lifetime, float_features_count, cat_features_count); } diff --git a/dbms/src/Dictionaries/CatBoostModel.h b/dbms/src/Dictionaries/CatBoostModel.h index db00ba36bb3..f4248930aa2 100644 --- a/dbms/src/Dictionaries/CatBoostModel.h +++ b/dbms/src/Dictionaries/CatBoostModel.h @@ -55,7 +55,7 @@ public: bool isModified() const override; - std::unique_ptr cloneObject() const override; + std::unique_ptr clone() const override; std::exception_ptr getCreationException() const override { return creation_exception; } diff --git a/dbms/src/Dictionaries/IDictionary.h b/dbms/src/Dictionaries/IDictionary.h index 21083677a12..cba1a173833 100644 --- a/dbms/src/Dictionaries/IDictionary.h +++ b/dbms/src/Dictionaries/IDictionary.h @@ -41,8 +41,6 @@ struct IDictionaryBase : public IExternalLoadable virtual bool isCached() const = 0; - virtual std::unique_ptr clone() const = 0; - virtual const IDictionarySource * getSource() const = 0; virtual const DictionaryStructure & getStructure() const = 0; @@ -61,11 +59,6 @@ struct IDictionaryBase : public IExternalLoadable return source && source->isModified(); } - std::unique_ptr cloneObject() const override - { - return clone(); - } - std::shared_ptr shared_from_this() { return std::static_pointer_cast(IExternalLoadable::shared_from_this()); diff --git a/dbms/src/Interpreters/ExternalLoader.cpp b/dbms/src/Interpreters/ExternalLoader.cpp index 9b784639366..3bde003771b 100644 --- a/dbms/src/Interpreters/ExternalLoader.cpp +++ b/dbms/src/Interpreters/ExternalLoader.cpp @@ -127,7 +127,7 @@ void ExternalLoader::reloadAndUpdate(bool throw_on_error) try { - auto loadable_ptr = failed_loadable_object.second.loadable->cloneObject(); + auto loadable_ptr = failed_loadable_object.second.loadable->clone(); if (const auto exception_ptr = loadable_ptr->getCreationException()) { /// recalculate next attempt time @@ -211,7 +211,7 @@ void ExternalLoader::reloadAndUpdate(bool throw_on_error) if (current->isModified()) { /// create new version of loadable object - auto new_version = current->cloneObject(); + auto new_version = current->clone(); if (const auto exception_ptr = new_version->getCreationException()) std::rethrow_exception(exception_ptr); diff --git a/dbms/src/Interpreters/IExternalLoadable.h b/dbms/src/Interpreters/IExternalLoadable.h index 9e52b9e6864..c16f1538e09 100644 --- a/dbms/src/Interpreters/IExternalLoadable.h +++ b/dbms/src/Interpreters/IExternalLoadable.h @@ -35,7 +35,7 @@ public: virtual bool isModified() const = 0; - virtual std::unique_ptr cloneObject() const = 0; + virtual std::unique_ptr clone() const = 0; virtual std::exception_ptr getCreationException() const = 0; };