public void deregister(Model model, String functionName, boolean needToDeleteJar)
      throws Exception {
    try {
      acquireLock();
      UDFInformation information = udfTable.getUDFInformation(model, functionName);
      if (information == null) {
        return;
      }
      udfTable.removeUDFInformation(model, functionName);
      udfTable.removeFunctionClass(model, functionName);
      if (needToDeleteJar) {
        UDFExecutableManager.getInstance().removeFileUnderLibRoot(information.getJarName());
        UDFExecutableManager.getInstance()
            .removeFileUnderTemporaryRoot(functionName.toUpperCase() + ".txt");
      }
    } finally {
      releaseLock();
    }
  }
Only call this method directly for registering new data node, otherwise you need to call
register().
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/udf/UDFManagementService.java