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


##########
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:
   sounds like a good idea



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