@TestOnly
  public void deregisterAll() throws UDFManagementException {
    for (UDFInformation information : getUDFInformation(Model.TREE)) {
      try {
        deregister(Model.TREE, information.getFunctionName(), false);
      } catch (Exception e) {
        throw new UDFManagementException(e.getMessage());
      }
    }
    for (UDFInformation information : getUDFInformation(Model.TABLE)) {
      try {
        deregister(Model.TABLE, information.getFunctionName(), false);
      } catch (Exception e) {
        throw new UDFManagementException(e.getMessage());
      }
    }
  }
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