mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Fixed build
This commit is contained in:
parent
82ba24cd10
commit
dce3fc60ad
@ -22,8 +22,8 @@ namespace ErrorCodes
|
||||
|
||||
BlockIO InterpreterCreateFunctionQuery::execute()
|
||||
{
|
||||
auto context = getContext();
|
||||
context->checkAccess(AccessType::CREATE_FUNCTION);
|
||||
auto current_context = getContext();
|
||||
current_context->checkAccess(AccessType::CREATE_FUNCTION);
|
||||
|
||||
FunctionNameNormalizer().visit(query_ptr.get());
|
||||
auto * create_function_query = query_ptr->as<ASTCreateFunctionQuery>();
|
||||
@ -40,7 +40,7 @@ BlockIO InterpreterCreateFunctionQuery::execute()
|
||||
{
|
||||
try
|
||||
{
|
||||
UserDefinedObjectsLoader::instance().storeObject(context, UserDefinedObjectType::Function, function_name, *query_ptr);
|
||||
UserDefinedObjectsLoader::instance().storeObject(current_context, UserDefinedObjectType::Function, function_name, *query_ptr);
|
||||
}
|
||||
catch (Exception & exception)
|
||||
{
|
||||
|
@ -12,14 +12,14 @@ namespace DB
|
||||
|
||||
BlockIO InterpreterDropFunctionQuery::execute()
|
||||
{
|
||||
auto context = getContext();
|
||||
context->checkAccess(AccessType::DROP_FUNCTION);
|
||||
auto current_context = getContext();
|
||||
current_context->checkAccess(AccessType::DROP_FUNCTION);
|
||||
|
||||
FunctionNameNormalizer().visit(query_ptr.get());
|
||||
auto & drop_function_query = query_ptr->as<ASTDropFunctionQuery &>();
|
||||
|
||||
UserDefinedFunctionFactory::instance().unregisterFunction(drop_function_query.function_name);
|
||||
UserDefinedObjectsLoader::instance().removeObject(context, UserDefinedObjectType::Function, drop_function_query.function_name);
|
||||
UserDefinedObjectsLoader::instance().removeObject(current_context, UserDefinedObjectType::Function, drop_function_query.function_name);
|
||||
|
||||
return {};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user