roryqi commented on code in PR #12162:
URL: https://github.com/apache/gravitino/pull/12162#discussion_r3637822911
##########
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();
+ }
Review Comment:
Updated this API to use TagValueConstraint instead of Optional<String[]>. It
now models the three definition-side cases explicitly as ANY_VALUE,
WITHOUT_VALUES, and ALLOWED_VALUES, so callers no longer need to infer
semantics from Optional.empty() or empty arrays.
--
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]