yuxiqian commented on code in PR #3668:
URL: https://github.com/apache/flink-cdc/pull/3668#discussion_r1904871634


##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/utils/RecordUtils.java:
##########
@@ -384,6 +390,40 @@ public static TableId getTableId(SourceRecord dataRecord) {
         return new TableId(dbName, null, tableName);
     }
 
+    public static SourceRecord setTableId(
+            SourceRecord dataRecord, TableId originalTableId, TableId tableId) 
{

Review Comment:
   Thanks for the suggestion, but I noticed that it's not very convenient to 
peel it out there since `SchemaChangeEvent` is still in raw state (DDL 
expression only) and no table information available yet.
   
   More specifically, there's no TableId information available here and must be 
parsed manually from DDL string.
   
   ```java
   // MySqlStreamingChangeEventSource.java
   
   eventDispatcher.dispatchSchemaChangeEvent(
       partition,
       tableId,
       (receiver) -> {
           try {
               receiver.schemaChangeEvent(schemaChangeEvent);
           } catch (Exception e) {
               throw new DebeziumException(e);
           }
       });
   ```
   
   Any suggestions on this?



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to