diff --git a/core/src/main/java/org/apache/iceberg/inmemory/InMemoryCatalog.java b/core/src/main/java/org/apache/iceberg/inmemory/InMemoryCatalog.java index a880f94f4385..6277e7972ab9 100644 --- a/core/src/main/java/org/apache/iceberg/inmemory/InMemoryCatalog.java +++ b/core/src/main/java/org/apache/iceberg/inmemory/InMemoryCatalog.java @@ -18,6 +18,8 @@ */ package org.apache.iceberg.inmemory; +import static java.util.Objects.requireNonNull; + import java.io.Closeable; import java.io.IOException; import java.util.Arrays; @@ -68,6 +70,7 @@ public class InMemoryCatalog extends BaseMetastoreViewCatalog private final ConcurrentMap views; private FileIO io; private String catalogName; + private Map properties; private String warehouseLocation; private CloseableGroup closeableGroup; @@ -85,6 +88,7 @@ public String name() { @Override public void initialize(String name, Map properties) { this.catalogName = name != null ? name : InMemoryCatalog.class.getSimpleName(); + this.properties = ImmutableMap.copyOf(properties); String warehouse = properties.getOrDefault(CatalogProperties.WAREHOUSE_LOCATION, ""); this.warehouseLocation = warehouse.replaceAll("/*$", ""); @@ -94,6 +98,12 @@ public void initialize(String name, Map properties) { closeableGroup.setSuppressCloseFailure(true); } + @Override + protected Map properties() { + requireNonNull(properties, "properties"); + return properties; + } + @Override protected TableOperations newTableOps(TableIdentifier tableIdentifier) { return new InMemoryTableOperations(io, tableIdentifier);