[Feature] Flink connector factory shouldn't validate "table." and "client." options
Search before asking
- [x] I searched in the issues and found nothing similar.
Motivation
Currently, in the FlinkTableFactory, we validate the options table to ensure that it includes all entries from FlinkTableFactory#requiredOptions and contains no unexpected entries beyond those specified in FlinkTableFactory#optionalOptions. This validation helps catch mistakes when users enter incorrect option keys. However, it also prevents the connector from being compatible with newer versions of the Fluss table, which might include options unknown to the connector.
For instance, consider a scenario where a user is working with a connector version v0.5.0, while the Fluss cluster has been upgraded to v0.6.0. In version v0.6.0, the cluster may automatically add options like table.lake.format during table creation. Since this option is unrecognized by the older v0.5 connector, trying to create a Fluss table on a v0.6 cluster using this connector will include the unrecognized table.lake.format option, triggering an exception when the table is read by this connector. This situation forces users to upgrade to a v0.6 connector to interact with a v0.6 cluster, which is undesirable as it disrupts the smooth upgrade process of the Fluss cluster without affecting all clients.
To address this, we should exclude options prefixed with table.* and client.* from FlinkTableFactory#optionalOptions. Instead, we can use FactoryHelper.validateExcept("table.", "client.") for option validation, allowing flexibility for unknown options while maintaining compatibility.
https://github.com/alibaba/fluss/blob/d13758d12c030f18bd4faec8234b56cdc02ac331/fluss-connectors/fluss-connector-flink/src/main/java/com/alibaba/fluss/connector/flink/catalog/FlinkTableFactory.java#L74
https://github.com/alibaba/fluss/blob/d13758d12c030f18bd4faec8234b56cdc02ac331/fluss-connectors/fluss-connector-flink/src/main/java/com/alibaba/fluss/connector/flink/catalog/FlinkTableFactory.java#L138
Solution
No response
Anything else?
No response
Willingness to contribute
- [ ] I'm willing to submit a PR!
take assign
@VKttZXvC do you want to contribute this issue?
Hi @wuchong , could you assign this issue to me? I made a PR to contribute this issue. In my understanding, we don't need to add these options into 'requiredOptions' or 'optionalOptions' in the factory since they are not desired in the v0.6 connector. Just skip the validation for those options for backward compatibility.