Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
FANNG1 committed Oct 17, 2024
1 parent 6b37a88 commit 92e2690
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -304,16 +302,15 @@ private void closePostgreSQLCatalogResource() {
}

// Some io and security configuration should pass to Iceberg REST client
private LoadTableResponse injectTableConfig(
Supplier<LoadTableResponse> supplier, Function<String, Map<String, String>> configInjector) {
private LoadTableResponse injectTableConfig(Supplier<LoadTableResponse> supplier) {
LoadTableResponse loadTableResponse = supplier.get();
return LoadTableResponse.builder()
.withTableMetadata(loadTableResponse.tableMetadata())
.addAllConfig(configInjector.apply(loadTableResponse.tableMetadata().location()))
.addAllConfig(getCatalogConfigToClient())
.build();
}

private Map<String, String> getCatalogConfigToClient(String location) {
private Map<String, String> getCatalogConfigToClient() {
return catalogConfigToClients;
}

Expand Down

0 comments on commit 92e2690

Please sign in to comment.