Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions fe/fe-core/src/main/cup/sql_parser.cup
Original file line number Diff line number Diff line change
Expand Up @@ -2571,11 +2571,6 @@ drop_stmt ::=
{:
RESULT = new DropCatalogStmt(ifExists, catalogName);
:}
/* Function */
| KW_DROP opt_var_type:type KW_FUNCTION opt_if_exists:ifExists function_name:functionName LPAREN func_args_def:args RPAREN
{:
RESULT = new DropFunctionStmt(type, ifExists, functionName, args);
:}
/* Table */
| KW_DROP KW_TABLE opt_if_exists:ifExists table_name:name opt_force:force
{:
Expand Down

This file was deleted.

28 changes: 0 additions & 28 deletions fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@
import org.apache.doris.analysis.CreateTableStmt;
import org.apache.doris.analysis.DdlStmt;
import org.apache.doris.analysis.DistributionDesc;
import org.apache.doris.analysis.DropFunctionStmt;
import org.apache.doris.analysis.DropPartitionClause;
import org.apache.doris.analysis.DropTableStmt;
import org.apache.doris.analysis.Expr;
import org.apache.doris.analysis.FunctionName;
import org.apache.doris.analysis.InstallPluginStmt;
import org.apache.doris.analysis.ModifyDistributionClause;
import org.apache.doris.analysis.PartitionRenameClause;
Expand All @@ -48,7 +46,6 @@
import org.apache.doris.analysis.RecoverTableStmt;
import org.apache.doris.analysis.ReplacePartitionClause;
import org.apache.doris.analysis.RollupRenameClause;
import org.apache.doris.analysis.SetType;
import org.apache.doris.analysis.SlotRef;
import org.apache.doris.analysis.TableRenameClause;
import org.apache.doris.analysis.UninstallPluginStmt;
Expand Down Expand Up @@ -274,14 +271,12 @@
import org.apache.doris.statistics.StatisticsCleaner;
import org.apache.doris.statistics.StatisticsJobAppender;
import org.apache.doris.statistics.query.QueryStats;
import org.apache.doris.system.Backend;
import org.apache.doris.system.Frontend;
import org.apache.doris.system.HeartbeatMgr;
import org.apache.doris.system.SystemInfoService;
import org.apache.doris.system.SystemInfoService.HostInfo;
import org.apache.doris.task.AgentBatchTask;
import org.apache.doris.task.AgentTaskExecutor;
import org.apache.doris.task.CleanUDFCacheTask;
import org.apache.doris.task.CompactionTask;
import org.apache.doris.task.MasterTaskExecutor;
import org.apache.doris.task.PriorityMasterTaskExecutor;
Expand Down Expand Up @@ -6571,17 +6566,6 @@ public void replayCreateGlobalFunction(Function function) {
globalFunctionMgr.replayAddFunction(function);
}

public void dropFunction(DropFunctionStmt stmt) throws UserException {
FunctionName name = stmt.getFunctionName();
if (SetType.GLOBAL.equals(stmt.getType())) {
globalFunctionMgr.dropFunction(stmt.getFunction(), stmt.isIfExists());
} else {
Database db = getInternalCatalog().getDbOrDdlException(name.getDb());
db.dropFunction(stmt.getFunction(), stmt.isIfExists());
}
cleanUDFCacheTask(stmt); // BE will cache classload, when drop function, BE need clear cache
}

public void replayDropFunction(FunctionSearchDesc functionSearchDesc) throws MetaNotFoundException {
String dbName = functionSearchDesc.getName().getDb();
Database db = getInternalCatalog().getDbOrMetaException(dbName);
Expand Down Expand Up @@ -7090,18 +7074,6 @@ public void onErasePartition(Partition partition) {
getInternalCatalog().erasePartitionDropBackendReplicas(Lists.newArrayList(partition));
}

public void cleanUDFCacheTask(DropFunctionStmt stmt) throws UserException {
ImmutableMap<Long, Backend> backendsInfo = Env.getCurrentSystemInfo().getAllBackendsByAllCluster();
String functionSignature = stmt.signatureString();
AgentBatchTask batchTask = new AgentBatchTask();
for (Backend backend : backendsInfo.values()) {
CleanUDFCacheTask cleanUDFCacheTask = new CleanUDFCacheTask(backend.getId(), functionSignature);
batchTask.addTask(cleanUDFCacheTask);
LOG.info("clean udf cache in be {}, beId {}", backend.getHost(), backend.getId());
}
AgentTaskExecutor.submit(batchTask);
}

public void setPartitionVersion(AdminSetPartitionVersionStmt stmt) throws DdlException {
String database = stmt.getDatabase();
String table = stmt.getTable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import org.apache.doris.analysis.CreateWorkloadSchedPolicyStmt;
import org.apache.doris.analysis.DdlStmt;
import org.apache.doris.analysis.DropCatalogStmt;
import org.apache.doris.analysis.DropFunctionStmt;
import org.apache.doris.analysis.DropIndexPolicyStmt;
import org.apache.doris.analysis.DropRepositoryStmt;
import org.apache.doris.analysis.DropSqlBlockRuleStmt;
Expand Down Expand Up @@ -87,9 +86,7 @@ public class DdlExecutor {
**/
public static void execute(Env env, DdlStmt ddlStmt) throws Exception {
checkDdlStmtSupported(ddlStmt);
if (ddlStmt instanceof DropFunctionStmt) {
env.dropFunction((DropFunctionStmt) ddlStmt);
} else if (ddlStmt instanceof CreateEncryptKeyStmt) {
if (ddlStmt instanceof CreateEncryptKeyStmt) {
EncryptKeyHelper.createEncryptKey((CreateEncryptKeyStmt) ddlStmt);
} else if (ddlStmt instanceof CreateTableStmt) {
env.createTable((CreateTableStmt) ddlStmt);
Expand Down
Loading