JNSimba commented on code in PR #313:
URL: 
https://github.com/apache/doris-flink-connector/pull/313#discussion_r1473724284


##########
flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/serializer/JsonDebeziumSchemaSerializer.java:
##########
@@ -156,13 +161,25 @@ public DorisRecord serialize(String record) throws 
IOException {
             return null;
         }
 
-        if (firstLoad) {
-            schemaChange.init(recordRoot);
-            firstLoad = false;
+        Map<String, String> tableMapping = schemaChange.getTableMapping();
+        if (initSchemaChange(firstLoad, tableMapping)) {
+            schemaChange.init(recordRoot, initTableSet);
+            this.firstLoad = false;
         }
+
         return dataChange.serialize(record, recordRoot, op);
     }
 
+    private boolean initSchemaChange(boolean firstLoad, Map<String, String> 
tableMapping) {
+        if (firstLoad) {
+            return true;
+        }

Review Comment:
   Do we need to determine the `firstLoad` of each table?



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