yuqi1129 commented on code in PR #10081:
URL: https://github.com/apache/gravitino/pull/10081#discussion_r2966496263
##########
catalogs/catalog-lakehouse-iceberg/src/main/java/org/apache/gravitino/catalog/lakehouse/iceberg/IcebergCatalog.java:
##########
@@ -81,4 +94,67 @@ public PropertiesMetadata catalogPropertiesMetadata() throws
UnsupportedOperatio
public PropertiesMetadata schemaPropertiesMetadata() throws
UnsupportedOperationException {
return SCHEMA_PROPERTIES_META;
}
+
+ @Override
+ public Map<String, String> propertiesWithCredentialProviders() {
+ Map<String, String> properties =
Maps.newHashMap(super.propertiesWithCredentialProviders());
+ return buildCredentialProvidersIfNecessary(properties);
+ }
+
+ private Map<String, String> buildCredentialProvidersIfNecessary(Map<String,
String> properties) {
+ // If credential providers already set, return as is
Review Comment:
`PaimonCatalog.buildCredentialProvidersIfNecessary()` is an almost exact
copy of this method. This is ~50 lines of duplicated logic.
Consider extracting to a protected/static utility in `BaseCatalog` or a
shared helper class, e.g.:
```java
// In BaseCatalog:
protected static Map<String, String> buildJdbcCredentialProvidersIfNecessary(
Map<String, String> properties, String metastoreUri, String backend) {
... }
```
If keeping them separate is intentional (e.g., different backend key names),
a comment explaining the difference would help.
--
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]