gavinchou commented on code in PR #48041:
URL: https://github.com/apache/doris/pull/48041#discussion_r1971796577


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/InternalSchemaInitializer.java:
##########
@@ -358,7 +359,58 @@ private boolean created() {
 
         // 3. check audit table
         optionalStatsTbl = db.getTable(AuditLoader.AUDIT_LOG_TABLE);
-        return optionalStatsTbl.isPresent();
-    }
+        if (!optionalStatsTbl.isPresent()) {
+            return false;
+        }
+
+        // 4. check and update audit table schema
+        OlapTable auditTable = (OlapTable) optionalStatsTbl.get();
+        List<ColumnDef> expectedSchema = InternalSchema.AUDIT_SCHEMA;
 
+        // 5. check if we need to add new columns
+        List<AlterClause> alterClauses = Lists.newArrayList();

Review Comment:
   we'd better to add UT to cover the added logic 



-- 
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