Fix tests

This commit is contained in:
ANDREI STAROVEROV 2021-07-21 01:02:18 +03:00
parent 44e1c2bcf5
commit c03a75a289
2 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,7 @@
#include <Interpreters/Context.h>
#include <Interpreters/FunctionNameNormalizer.h>
#include <Interpreters/InterpreterDropFunctionQuery.h>
#include <Interpreters/UserDefinedObjectsOnDisk.h>
#include <Functions/FunctionFactory.h>
#include <Parsers/ASTDropFunctionQuery.h>
@ -15,6 +16,7 @@ BlockIO InterpreterDropFunctionQuery::execute()
FunctionNameNormalizer().visit(query_ptr.get());
auto & drop_function_query = query_ptr->as<ASTDropFunctionQuery &>();
FunctionFactory::instance().unregisterUserDefinedFunction(drop_function_query.function_name);
UserDefinedObjectsOnDisk::instance().removeUserDefinedFunction(getContext(), drop_function_query.function_name);
return {};
}

View File

@ -45,11 +45,13 @@ CREATE TABLE [] TABLE CREATE
CREATE VIEW [] VIEW CREATE
CREATE DICTIONARY [] DICTIONARY CREATE
CREATE TEMPORARY TABLE [] GLOBAL CREATE
CREATE FUNCTION [] DATABASE CREATE
CREATE [] \N ALL
DROP DATABASE [] DATABASE DROP
DROP TABLE [] TABLE DROP
DROP VIEW [] VIEW DROP
DROP DICTIONARY [] DICTIONARY DROP
DROP FUNCTION [] DATABASE DROP
DROP [] \N ALL
TRUNCATE ['TRUNCATE TABLE'] TABLE ALL
OPTIMIZE ['OPTIMIZE TABLE'] TABLE ALL