yuxiqian commented on code in PR #3428:
URL: https://github.com/apache/flink-cdc/pull/3428#discussion_r1666132537
##########
flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/operators/schema/SchemaOperator.java:
##########
@@ -270,10 +276,18 @@ private RecordData regenerateRecordData(
private List<TableId> getRoutedTables(TableId originalTableId) {
return routes.stream()
.filter(route -> route.f0.isMatch(originalTableId))
- .map(route -> route.f1)
+ .map(route -> resolveReplacement(originalTableId, route))
.collect(Collectors.toList());
}
+ private TableId resolveReplacement(
+ TableId originalTable, Tuple3<Selectors, String, String> route) {
+ if (route.f2 != null) {
+ return TableId.parse(route.f1.replace(route.f2,
originalTable.getTableName()));
Review Comment:
Done, used `LoadingCache` to store table mapping relations. As for
previously discussed `hashCode` caching optimization, I'll open another PR to
address it.
--
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]