This is an automated email from the ASF dual-hosted git repository.

snazy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new aebcaf272 Nit: Cleanup fields in `PolarisGenericTableCatalog` (#3784)
aebcaf272 is described below

commit aebcaf27278685e4e7c448fe19fdbda1ad9962bc
Author: Robert Stupp <[email protected]>
AuthorDate: Tue Feb 17 12:38:33 2026 +0100

    Nit: Cleanup fields in `PolarisGenericTableCatalog` (#3784)
---
 .../catalog/generic/PolarisGenericTableCatalog.java    | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git 
a/runtime/service/src/main/java/org/apache/polaris/service/catalog/generic/PolarisGenericTableCatalog.java
 
b/runtime/service/src/main/java/org/apache/polaris/service/catalog/generic/PolarisGenericTableCatalog.java
index 3332608c1..b776788be 100644
--- 
a/runtime/service/src/main/java/org/apache/polaris/service/catalog/generic/PolarisGenericTableCatalog.java
+++ 
b/runtime/service/src/main/java/org/apache/polaris/service/catalog/generic/PolarisGenericTableCatalog.java
@@ -18,6 +18,8 @@
  */
 package org.apache.polaris.service.catalog.generic;
 
+import static java.util.Objects.requireNonNull;
+
 import java.util.List;
 import java.util.Map;
 import org.apache.iceberg.catalog.Namespace;
@@ -28,7 +30,6 @@ import org.apache.iceberg.exceptions.NoSuchTableException;
 import org.apache.polaris.core.catalog.GenericTableCatalog;
 import org.apache.polaris.core.catalog.PolarisCatalogHelpers;
 import org.apache.polaris.core.context.CallContext;
-import org.apache.polaris.core.entity.CatalogEntity;
 import org.apache.polaris.core.entity.PolarisEntity;
 import org.apache.polaris.core.entity.PolarisEntitySubType;
 import org.apache.polaris.core.entity.PolarisEntityType;
@@ -46,28 +47,25 @@ import org.slf4j.LoggerFactory;
 public class PolarisGenericTableCatalog implements GenericTableCatalog {
   private static final Logger LOGGER = 
LoggerFactory.getLogger(PolarisGenericTableCatalog.class);
 
-  private String name;
-
   private final CallContext callContext;
   private final PolarisResolutionManifestCatalogView resolvedEntityView;
-  private final CatalogEntity catalogEntity;
-  private long catalogId = -1;
-  private PolarisMetaStoreManager metaStoreManager;
+  private final long catalogId;
+  private final PolarisMetaStoreManager metaStoreManager;
 
   public PolarisGenericTableCatalog(
       PolarisMetaStoreManager metaStoreManager,
       CallContext callContext,
       PolarisResolutionManifestCatalogView resolvedEntityView) {
     this.callContext = callContext;
-    this.resolvedEntityView = resolvedEntityView;
-    this.catalogEntity = resolvedEntityView.getResolvedCatalogEntity();
-    this.catalogId = catalogEntity.getId();
+    this.resolvedEntityView = requireNonNull(resolvedEntityView, "No resolved 
entity view");
+    this.catalogId =
+        requireNonNull(resolvedEntityView.getResolvedCatalogEntity(), "No 
resolved catalog entity")
+            .getId();
     this.metaStoreManager = metaStoreManager;
   }
 
   @Override
   public void initialize(String name, Map<String, String> properties) {
-    this.name = name;
     if (!properties.isEmpty()) {
       throw new IllegalStateException("PolarisGenericTableCatalog does not 
support properties");
     }

Reply via email to