You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "loserwang1024 (via GitHub)" <gi...@apache.org> on 2024/08/02 02:45:20 UTC

Re: [PR] [hotfix] [base] Fix the serialization error occurring with table names containing dot [flink-cdc]

loserwang1024 commented on code in PR #2705:
URL: https://github.com/apache/flink-cdc/pull/2705#discussion_r1701125755


##########
flink-cdc-connect/flink-cdc-source-connectors/flink-cdc-base/src/main/java/org/apache/flink/cdc/connectors/base/source/meta/split/SourceSplitSerializer.java:
##########
@@ -199,7 +199,7 @@ public static void writeTableSchemas(
             boolean useCatalogBeforeSchema =
                     SerializerUtils.shouldUseCatalogBeforeSchema(entry.getKey());
             out.writeBoolean(useCatalogBeforeSchema);
-            out.writeUTF(entry.getKey().toString());
+            out.writeUTF(entry.getKey().toDoubleQuotedString());

Review Comment:
   If without this change, NullPointerException will be thrown. We have done it in  out.writeUTF(snapshotSplit.getTableId().toDoubleQuotedString()) but not in writeTableSchemas.
   <img width="793" alt="image" src="https://github.com/user-attachments/assets/996fa365-e10c-4c90-aab8-7d9e667751fc">
   



-- 
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-unsubscribe@flink.apache.org

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