tub commented on code in PR #4078:
URL: https://github.com/apache/flink-cdc/pull/4078#discussion_r2257731246
##########
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-paimon/src/main/java/org/apache/flink/cdc/connectors/paimon/sink/PaimonDataSinkFactory.java:
##########
@@ -49,15 +50,21 @@ public class PaimonDataSinkFactory implements
DataSinkFactory {
@Override
public DataSink createDataSink(Context context) {
FactoryHelper.createFactoryHelper(this, context)
- .validateExcept(PREFIX_TABLE_PROPERTIES,
PREFIX_CATALOG_PROPERTIES);
+ .validateExcept(PREFIX_TABLE_PROPERTIES,
PREFIX_SPECIFIC_TABLE_PROPERTIES, PREFIX_CATALOG_PROPERTIES);
Map<String, String> allOptions =
context.getFactoryConfiguration().toMap();
Map<String, String> catalogOptions = new HashMap<>();
Map<String, String> tableOptions = new HashMap<>();
+ Map<String, String> tableSpecificOptions = new HashMap<>();
allOptions.forEach(
(key, value) -> {
if (key.startsWith(PREFIX_TABLE_PROPERTIES)) {
-
tableOptions.put(key.substring(PREFIX_TABLE_PROPERTIES.length()), value);
+ String keyWithoutPrefix =
key.substring(PREFIX_TABLE_PROPERTIES.length());
+ // General table option: table.properties.<property>
+ tableOptions.put(keyWithoutPrefix, value);
+ } else if
(key.startsWith(PREFIX_SPECIFIC_TABLE_PROPERTIES)) {
Review Comment:
Shouldn't we flip these so that PREFIX_SPECIFIC_TABLE_PROPERTIES take
priority of PREFIX_TABLE_PROPERTIES?
--
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]