snazy commented on code in PR #4526:
URL: https://github.com/apache/polaris/pull/4526#discussion_r3312085178


##########
persistence/nosql/persistence/metastore-maintenance/src/main/java/org/apache/polaris/persistence/nosql/metastore/maintenance/CatalogRetainedIdentifier.java:
##########
@@ -302,25 +344,27 @@ private <O extends ContainerObj> void perRealmContainer(
         });
   }
 
-  private <O extends BaseCommitObj> void perCatalog(
-      String what,
-      String refNamePattern,
+  private void perCatalogRoles(
       CatalogObj catalogObj,
       String celRetainExpr,
-      Class<O> objClazz,
-      Function<O, IndexContainer<ObjRef>> indexContainerFunction,
+      Function<CatalogRolesObj, IndexContainer<ObjRef>> indexContainerFunction,
       RetainedCollector collector,
-      Consumer<O> objConsumer) {
+      Consumer<CatalogRolesObj> objConsumer) {
     LOGGER.info(
-        "Identifying {} for catalog '{}' ({})...", what, catalogObj.name(), 
catalogObj.stableId());
+        "Identifying {} for catalog '{}' ({})...",
+        "catalog roles",
+        catalogObj.name(),
+        catalogObj.stableId());
     ignoreReferenceNotFound(
         () -> {
           var persistence = collector.realmPersistence();
-          var refName = format(refNamePattern, catalogObj.stableId());
+          var refName =
+              format(CatalogRolesObj.CATALOG_ROLES_REF_NAME_PATTERN, 
catalogObj.stableId());
           var historyContinue =
-              new CelReferenceContinuePredicate<O>(refName, persistence, 
celRetainExpr);
+              new CelReferenceContinuePredicate<CatalogRolesObj>(
+                  refName, persistence, celRetainExpr);
           collector.refRetainIndexToSingleObj(
-              refName, objClazz, historyContinue, indexContainerFunction, 
objConsumer);
+              refName, CatalogRolesObj.class, historyContinue, 
indexContainerFunction, objConsumer);

Review Comment:
   Good point



-- 
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]

Reply via email to