uicosp commented on code in PR #3776:
URL: https://github.com/apache/flink-cdc/pull/3776#discussion_r2309264902
##########
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-mysql/src/main/java/org/apache/flink/cdc/connectors/mysql/factory/MySqlDataSourceFactory.java:
##########
@@ -235,6 +236,27 @@ public DataSource createDataSource(Context context) {
configFactory.chunkKeyColumn(chunkKeyColumnMap);
}
+ String snapshotFilters = config.get(SCAN_SNAPSHOT_FILTERS);
+ if (snapshotFilters != null) {
+ Map<String, String> snapshotFilterMap = new HashMap<>();
+ for (String snapshotFilter : snapshotFilters.split(";")) {
+ String[] splits = snapshotFilter.trim().split(":");
Review Comment:
Sorry I’m late, I was busy with something else. I have modified the
snapshotFilters parsing logic in MySqlDataSourceFactory to correctly handle
semicolons and colons within filter conditions.
Key improvements:
1. parseSnapshotFilters method:
- Intelligently parses semicolon delimiters while recognizing quoted
content
- Supports both single and double quotes
- Semicolons within quotes are not treated as delimiters
2. parseTableAndCondition method:
- Splits only on the first colon to avoid misinterpreting colons in
condition values
- Ensures proper separation of table names and conditions
--
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]