diff --git a/src/Functions/FunctionFactory.cpp b/src/Functions/FunctionFactory.cpp index 26cefc45df0..f691e6e7e41 100644 --- a/src/Functions/FunctionFactory.cpp +++ b/src/Functions/FunctionFactory.cpp @@ -58,7 +58,7 @@ void FunctionFactory::registerFunction( FunctionOverloadResolverPtr FunctionFactory::getImpl( const std::string & name, - ContextConstPtr context) const + ContextPtr context) const { auto res = tryGetImpl(name, context); if (!res) @@ -89,14 +89,14 @@ std::vector FunctionFactory::getAllNames() const FunctionOverloadResolverPtr FunctionFactory::get( const std::string & name, - ContextConstPtr context) const + ContextPtr context) const { return getImpl(name, context); } FunctionOverloadResolverPtr FunctionFactory::tryGetImpl( const std::string & name_param, - ContextConstPtr context) const + ContextPtr context) const { std::lock_guard guard(mutex); String name = getAliasToOrName(name_param); @@ -127,8 +127,8 @@ FunctionOverloadResolverPtr FunctionFactory::tryGetImpl( } FunctionOverloadResolverPtr FunctionFactory::tryGet( - const std::string & name, - ContextConstPtr context) const + const std::string & name, + ContextPtr context) const { auto impl = tryGetImpl(name, context); return impl ? std::move(impl) : nullptr; diff --git a/src/Functions/FunctionFactory.h b/src/Functions/FunctionFactory.h index e62f8eb97da..b652ff46f5a 100644 --- a/src/Functions/FunctionFactory.h +++ b/src/Functions/FunctionFactory.h @@ -21,7 +21,7 @@ namespace DB * some dictionaries from Context. */ class FunctionFactory : private boost::noncopyable, - public IFactoryWithAliases> + public IFactoryWithAliases> { public: static FunctionFactory & instance(); @@ -50,14 +50,14 @@ public: std::vector getAllNames() const; /// Throws an exception if not found. - FunctionOverloadResolverPtr get(const std::string & name, ContextConstPtr context) const; + FunctionOverloadResolverPtr get(const std::string & name, ContextPtr context) const; /// Returns nullptr if not found. - FunctionOverloadResolverPtr tryGet(const std::string & name, ContextConstPtr context) const; + FunctionOverloadResolverPtr tryGet(const std::string & name, ContextPtr context) const; /// The same methods to get developer interface implementation. - FunctionOverloadResolverPtr getImpl(const std::string & name, ContextConstPtr context) const; - FunctionOverloadResolverPtr tryGetImpl(const std::string & name, ContextConstPtr context) const; + FunctionOverloadResolverPtr getImpl(const std::string & name, ContextPtr context) const; + FunctionOverloadResolverPtr tryGetImpl(const std::string & name, ContextPtr context) const; /// Register a function by its name. /// No locking, you must register all functions before usage of get. @@ -75,7 +75,7 @@ private: mutable std::mutex mutex; template - static FunctionOverloadResolverPtr adaptFunctionToOverloadResolver(ContextConstPtr context) + static FunctionOverloadResolverPtr adaptFunctionToOverloadResolver(ContextPtr context) { return std::make_unique(Function::create(context)); }