ThorneANN commented on code in PR #4246:
URL: https://github.com/apache/flink-cdc/pull/4246#discussion_r2958191457
##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/config/MySqlSourceConfigFactory.java:
##########
@@ -446,4 +481,47 @@ public MySqlSourceConfig createConfig(int subtaskId,
String serverName) {
useLegacyJsonFormat,
assignUnboundedChunkFirst);
}
+
+ /**
+ * Convert Flink CDC style table pattern to Debezium style.
+ *
+ * <p>In CDC-style table matching, table names are separated by commas and
use `\.` for regex
+ * matching. In Debezium style, table names are separated by pipes and use
`.` for regex
+ * matching while `\.` is used as database.table separator.
+ *
+ * <p>Examples:
+ *
+ * <ul>
+ * <li>{@code "db1.table_\.*,db2.user_\.*"} -> {@code
"db1\.table_.*|db2\.user_.*"}
+ * <li>{@code "test_db.orders"} -> {@code "test_db\.orders"}
+ * </ul>
+ *
+ * @param tables Flink CDC style table pattern
+ * @return Debezium style table pattern
+ */
+ private static String convertToDebeziumStyle(String tables) {
Review Comment:
may be batter
--
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]