jerryshao commented on code in PR #8712:
URL: https://github.com/apache/gravitino/pull/8712#discussion_r2534994272


##########
core/src/main/java/org/apache/gravitino/cache/ReverseIndexRules.java:
##########
@@ -142,4 +147,40 @@ public class ReverseIndexRules {
                   });
         }
       };
+
+  // Keep policies/tags to objects reverse index for metadata objects, so the 
key are objects and
+  // the values are policies/tags.
+  public static final ReverseIndexCache.ReverseIndexRule 
GENERIC_METADATA_OBJECT_REVERSE_RULE =
+      (entity, key, reverseIndexCache) -> {
+        // Name in GenericEntity contains no metalake.
+        GenericEntity genericEntity = (GenericEntity) entity;
+        EntityType type = entity.type();
+        if (genericEntity.name() != null) {
+          String[] levels = genericEntity.name().split("\\.");
+          String metadataName = key.identifier().namespace().levels()[0];
+          NameIdentifier objectsNameIdentifier =

Review Comment:
   "objects" or "object"?



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