yuqi1129 commented on code in PR #10081:
URL: https://github.com/apache/gravitino/pull/10081#discussion_r3093406604
##########
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 {
Review Comment:
The `buildCredentialProvidersIfNecessary` method in `IcebergCatalog` and
`PaimonCatalog` are nearly identical (the only difference is the backend
constant and property key sources). Consider extracting the shared logic into a
utility method in `BaseCatalog` or a helper class to reduce duplication. For
example:
```java
// In a shared utility or BaseCatalog
protected static Map<String, String> buildStorageCredentialProviders(
Map<String, String> properties, List<String> existingProviders) {
// S3, OSS, Azure checks...
}
```
The JDBC-backend check is catalog-specific, but the S3/OSS/Azure credential
detection is exactly the same code.
--
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]