JingsongLi commented on code in PR #4418:
URL: https://github.com/apache/paimon/pull/4418#discussion_r1827208204
##########
paimon-flink/paimon-flink-cdc/src/main/java/org/apache/paimon/flink/action/cdc/SynchronizationActionBase.java:
##########
@@ -193,8 +193,15 @@ protected abstract void buildSink(
EventParser.Factory<RichCdcMultiplexRecord> parserFactory);
protected FileStoreTable alterTableOptions(Identifier identifier,
FileStoreTable table) {
- // doesn't support altering bucket here
Map<String, String> dynamicOptions = new HashMap<>(tableConfig);
+ List<SchemaChange> tableOptionChanges = new ArrayList<>();
+
+ // Remove options that are no longer used
+ table.options().keySet().stream()
+ .filter(key -> !dynamicOptions.containsKey(key))
+ .forEach(key ->
tableOptionChanges.add(SchemaChange.removeOption(key)));
Review Comment:
This is danger. `tableConfig` maybe partial...
--
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]