roryqi commented on code in PR #14779:
URL: https://github.com/apache/gravitino/pull/14779#discussion_r4520481545


##########
core/src/main/java/org/apache/gravitino/storage/relational/service/PolicyTagRelService.java:
##########
@@ -217,6 +227,32 @@ private List<PolicyEntity> updateRelationsWithoutCommit(
         .collect(Collectors.toList());
   }
 
+  private static void validateSelector(TagPO tagPO, @Nullable String 
selectorJson)

Review Comment:
   Thanks, addressed both nits in 76d0984256. `validateAllowedValue` is now 
package-private and policy selectors call it with `TagValue.of(...)`, so the 
constraint rules and error messages are shared. JSON `null` is handled in the 
shared helper consistently with `POConverters`; the new assignment regression 
test and existing selector test cover it on all three databases.
   
   Also added the `IllegalArgumentException` Javadoc to the selector overload 
of `TagOperations.addPolicyForTag`.
   
   Validation: all 141 tests in `TestTagMetaService` and 
`TestPolicyTagRelService` passed on H2, MySQL and PostgreSQL. Spotless and `git 
diff --check` passed.



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