JNSimba commented on code in PR #248: URL: https://github.com/apache/doris-flink-connector/pull/248#discussion_r1410219429
########## flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/serializer/JsonDebeziumSchemaSerializer.java: ########## @@ -285,6 +313,46 @@ public List<String> extractDDLList(JsonNode record) throws JsonProcessingExcepti return SchemaChangeHelper.generateDDLSql(dorisTable); } + private TableSchema extractCreateTableSchema(JsonNode record) throws JsonProcessingException { Review Comment: alread add ########## flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/serializer/JsonDebeziumSchemaSerializer.java: ########## @@ -405,6 +479,25 @@ protected String extractTable(JsonNode record) { return extractJsonNode(record.get("source"), "table"); } + /** + * Parse event type + */ + protected EventType extractEventType(JsonNode record) throws JsonProcessingException { + JsonNode tableChange = extractTableChange(record); + if(tableChange == null || tableChange.get("type") == null){ + return null; + } + String type = tableChange.get("type").asText(); + if(EventType.ALTER.toString().equalsIgnoreCase(type)){ + return EventType.ALTER; + }else if(EventType.CREATE.toString().equalsIgnoreCase(type)){ + return EventType.CREATE; + }else{ Review Comment: alread remove -- 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