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


##########
flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/serializer/jsondebezium/JsonDebeziumSchemaChangeImplV2.java:
##########
@@ -137,50 +134,33 @@ public boolean schemaChange(JsonNode recordRoot) {
                     LOG.info("create table ddl status: {}", status);
                 }
             } else if (eventType.equals(EventType.ALTER)) {
-                // db,table
-                Tuple2<String, String> tuple = getDorisTableTuple(recordRoot);
-                if (tuple == null) {
+                Tuple2<String, String> dorisTableTuple = 
getDorisTableTuple(recordRoot);
+                if (dorisTableTuple == null) {
+                    LOG.warn("Failed to get doris table tuple. record={}", 
recordRoot);
                     return false;
                 }
                 List<String> ddlSqlList = extractDDLList(recordRoot);
-                if (CollectionUtils.isEmpty(ddlSqlList)) {
-                    LOG.info("ddl can not do schema change:{}", recordRoot);
-                    return false;
-                }
-                List<DDLSchema> ddlSchemas = 
SchemaChangeHelper.getDdlSchemas();
-                for (int i = 0; i < ddlSqlList.size(); i++) {
-                    DDLSchema ddlSchema = ddlSchemas.get(i);
-                    String ddlSql = ddlSqlList.get(i);
-                    boolean doSchemaChange = checkSchemaChange(tuple.f0, 
tuple.f1, ddlSchema);
-                    status = doSchemaChange && 
schemaChangeManager.execute(ddlSql, tuple.f0);
-                    LOG.info("schema change status:{}, ddl:{}", status, 
ddlSql);
-                }
-            } else {
-                LOG.info("Unsupported event type {}", eventType);

Review Comment:
   It seems that this branch is missing?



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