morningman commented on code in PR #31453:
URL: https://github.com/apache/doris/pull/31453#discussion_r1505519703


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java:
##########
@@ -3671,7 +3677,12 @@ public void replayAlterExternalTableSchema(String 
dbName, String tableName, List
 
     // Drop table
     public void dropTable(DropTableStmt stmt) throws DdlException {
-        getCurrentCatalog().dropTable(stmt);
+        CatalogIf<?> catalogIf = catalogMgr.getCatalog(stmt.getCatalogName());
+        if (catalogIf == null) {
+            getCurrentCatalog().dropTable(stmt);
+        } else {
+            catalogIf.dropTable(stmt);

Review Comment:
   ditto



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java:
##########
@@ -3042,6 +3042,12 @@ public void replayRenameDatabase(String dbName, String 
newDbName) {
      */
     public void createTable(CreateTableStmt stmt) throws UserException {
         getCurrentCatalog().createTable(stmt);
+        CatalogIf<?> catalogIf = catalogMgr.getCatalog(stmt.getCatalogName());
+        if (catalogIf == null) {
+            getCurrentCatalog().createTable(stmt);

Review Comment:
   We should throw exception if catalog does not exist



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to