uicosp commented on code in PR #3776:
URL: https://github.com/apache/flink-cdc/pull/3776#discussion_r2324656430


##########
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:
   You are right. Actually, at the beginning I tried using nested YAML MAP 
structures. However, I found that the 
YamlPipelineDefinitionParser.toSourceDef() method doesn’t support that; it only 
supports STRING values (because it uses Map<String, String> in Java).
   
   I’m not sure whether this was intentional or simply a limitation of the 
current implementation. If I could use Map<String, Object>, I could switch to 
YAML MAP structures, which is clearly more reasonable than parsing everything 
from strings.



-- 
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]

Reply via email to