ruanhang1993 commented on code in PR #3490: URL: https://github.com/apache/flink-cdc/pull/3490#discussion_r1698334598
########## flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-mysql/src/main/java/org/apache/flink/cdc/connectors/mysql/factory/MySqlDataSourceFactory.java: ########## @@ -181,6 +184,30 @@ public DataSource createDataSource(Context context) { } configFactory.tableList(capturedTables.toArray(new String[0])); + String chunkKeyColumns = config.get(SCAN_INCREMENTAL_SNAPSHOT_CHUNK_KEY_COLUMN); + if (chunkKeyColumns != null) { + Map<ObjectPath, String> chunkKeyColumnMap = new HashMap<>(); + for (String chunkKeyColumn : chunkKeyColumns.split(";")) { + String[] splits = chunkKeyColumn.split(":"); + if (splits.length == 2) { + Selectors chunkKeySelector = + new Selectors.SelectorsBuilder().includeTables(splits[0]).build(); + List<ObjectPath> tableList = + getChunkKeyColumnTableList( + configFactory.createConfig(0), chunkKeySelector); + for (ObjectPath table : tableList) { + chunkKeyColumnMap.put(table, splits[1]); + } + } else { + throw new IllegalArgumentException( Review Comment: ```suggestion throw new IllegalArgumentException(SCAN_INCREMENTAL_SNAPSHOT_CHUNK_KEY_COLUMN.key() + " = " + chunkKeyColumns + " failed to be parsed in this part '" + chunkKeyColumn + "'."); ``` -- 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