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


##########
api/src/main/java/org/apache/gravitino/tag/Tag.java:
##########
@@ -54,6 +54,26 @@ public interface Tag extends Auditable {
    */
   Map<String, String> properties();
 
+  /**
+   * @return The allowed assignment values of the tag. {@link 
Optional#empty()} means the tag is
+   *     unrestricted. A present empty array means the tag only accepts 
valueless assignments.
+   */
+  default Optional<String[]> allowedValues() {
+    return Optional.empty();
+  }
+
+  /**
+   * Returns the assignment values of the tag in the current metadata-object 
context.
+   *
+   * <p>The return value is present only when the tag is returned for a 
metadata object. A present
+   * empty array means the tag is directly or effectively assigned without 
values.

Review Comment:
   Also here. We'd better have a clear definition to separate different 
scenarios.



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