提交 7f87bb07 编写于 作者: A Alexey Milovidov

Fixed linkage [#CLICKHOUSE-2].

上级 e9ea838c
......@@ -43,8 +43,8 @@ public:
{
static_assert(std::is_same<decltype(&Function::create), Creator>::value, "Function::create has incorrect type");
if (!functions.emplace(Function::name, &Function::create).second)
throw Exception("FunctionFactory: the function name '" + std::string(Function::name) + "' is not unique",
if (!functions.emplace(std::string(Function::name), &Function::create).second)
throw Exception("FunctionFactory: the function name is not unique",
ErrorCodes::LOGICAL_ERROR);
}
};
......
......@@ -36,7 +36,7 @@ public:
template <typename Function>
void registerFunction()
{
if (!functions.emplace(Function::name, []{ return TableFunctionPtr(std::make_unique<Function>()); }).second)
if (!functions.emplace(std::string(Function::name), []{ return TableFunctionPtr(std::make_unique<Function>()); }).second)
throw Exception("TableFunctionFactory: the table function name '" + String(Function::name) + "' is not unique",
ErrorCodes::LOGICAL_ERROR);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册