yuqi1129 opened a new issue, #14719: URL: https://github.com/apache/gravitino/issues/14719
### Version main branch ### Describe what's wrong `PolicyManager.listPolicyInfosForMetadataObject` first checks that the object exists, using the catalog's normalizing dispatchers. Then `ObjectPolicyResolver` calls `EffectiveTagResolver.resolveWithSources`. That method reads tag relations for the object and for each parent object, but it uses the names exactly as the request spells them. If the spelling is different from the stored name, the existence check passes and the relation lookup fails with not found. #14681 / #14682 fixed this for `TagManager` but left this path out on purpose. ### Error message and/or stacktrace `NoSuchMetadataObjectException: Failed to resolve effective tags for metadata object ... due to not found` ### How to reproduce 1. Use a catalog with case-insensitive names, such as Hive. Create schema `analytics` and table `orders`. 2. Attach a tag that has a policy to `catalog.analytics`. 3. List the policies for `catalog.ANALYTICS.ORDERS`. The existence check passes, but the lookup fails. ### Additional context Normalize the object and each of its parent objects with the same rules that #14682 added in `TagManager`: case rules from the catalog capability, the physical table name, and no change to Semantic Model names. A shared helper would let both classes use the same code. The batch path `listPolicyInfosForMetadataObjects` also needs a check. -- 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]
