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


##########
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:
   Nit: this duplicates `TagMetaService.validateAllowedValue`, and the two now 
differ on JSON `null`. `POConverters.serializeAllowedValues` never writes JSON 
`null`, so that branch is only reachable from data written directly with SQL.
   
   Could this reuse the existing check, for example by making 
`validateAllowedValue` package-private and calling it with 
`TagValue.of(tagPO.getTagName(), value)`? That keeps the rule and the error 
messages in one place.



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