qidaye commented on a change in pull request #7391:
URL: https://github.com/apache/incubator-doris/pull/7391#discussion_r784675617



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java
##########
@@ -2642,16 +2657,24 @@ public void createDb(CreateDbStmt stmt) throws 
DdlException {
                     
ErrorReport.reportDdlException(ErrorCode.ERR_DB_CREATE_EXISTS, fullDbName);
                 }
             } else {
-                id = getNextId();
-                Database db = new Database(id, fullDbName);
-                db.setClusterName(clusterName);
                 unprotectCreateDb(db);
                 editLog.logCreateDb(db);
             }
         } finally {
             unlock();
         }
         LOG.info("createDb dbName = " + fullDbName + ", id = " + id);
+
+        // create tables in iceberg database
+        if (db.getDbProperties().getIcebergProperty().isExist()) {
+            IcebergProperty icebergProperty = 
db.getDbProperties().getIcebergProperty();
+            IcebergCatalog icebergCatalog = 
IcebergCatalogMgr.getCatalog(icebergProperty);
+            List<TableIdentifier> icebergTables = 
icebergCatalog.listTables(icebergProperty.getDatabase());

Review comment:
       Added a new `DorisIcebergException` which is a `RuntimeException` in 
`IcebergCatalog.listTable`.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to