From 92e269045ef1adc8f08488440ccd8ea6ffa73b01 Mon Sep 17 00:00:00 2001 From: fanng Date: Thu, 17 Oct 2024 14:17:32 +0800 Subject: [PATCH] fix comment --- .../iceberg/common/ops/IcebergCatalogWrapper.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/ops/IcebergCatalogWrapper.java b/iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/ops/IcebergCatalogWrapper.java index 11b42eefb69..dede17e3e9e 100644 --- a/iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/ops/IcebergCatalogWrapper.java +++ b/iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/ops/IcebergCatalogWrapper.java @@ -26,7 +26,6 @@ import java.util.Map; import java.util.Optional; import java.util.Set; -import java.util.function.Function; import java.util.function.Supplier; import lombok.Getter; import lombok.Setter; @@ -187,8 +186,7 @@ public void purgeTable(TableIdentifier tableIdentifier) { } public LoadTableResponse loadTable(TableIdentifier tableIdentifier) { - return injectTableConfig( - () -> CatalogHandlers.loadTable(catalog, tableIdentifier), this::getCatalogConfigToClient); + return injectTableConfig(() -> CatalogHandlers.loadTable(catalog, tableIdentifier)); } public boolean tableExists(TableIdentifier tableIdentifier) { @@ -304,16 +302,15 @@ private void closePostgreSQLCatalogResource() { } // Some io and security configuration should pass to Iceberg REST client - private LoadTableResponse injectTableConfig( - Supplier supplier, Function> configInjector) { + private LoadTableResponse injectTableConfig(Supplier supplier) { LoadTableResponse loadTableResponse = supplier.get(); return LoadTableResponse.builder() .withTableMetadata(loadTableResponse.tableMetadata()) - .addAllConfig(configInjector.apply(loadTableResponse.tableMetadata().location())) + .addAllConfig(getCatalogConfigToClient()) .build(); } - private Map getCatalogConfigToClient(String location) { + private Map getCatalogConfigToClient() { return catalogConfigToClients; }