roryqi opened a new pull request, #12143:
URL: https://github.com/apache/gravitino/pull/12143
### What changes were proposed in this pull request?
Implement tag assignment values:
- Add `TagValuePair` and change tag association requests to use tag-value
pair arrays.
- Add `allowedValues` to tag creation and detailed tag DTOs.
- Store assignment values in `tag_relation_meta.tag_value` with
`value_order`.
- Return assignment values in detailed tag responses for metadata objects.
- Add exact value lookup through `GET /tags/{tag}/objects?value=...`.
- Make repeated assignment idempotent and keep `allowedValues` immutable
after creation.
### Why are the changes needed?
Current tag assignment is boolean and cannot represent values such as
`data_domain=finance` without creating one tag per value.
Fix: #12127
### Does this PR introduce _any_ user-facing change?
Yes. Tag create requests and tag DTOs can include `allowedValues`; tag
association requests now support `tagsToAdd` / `tagsToRemove` as tag-value
pairs; object lookup for a tag supports the optional `value` query parameter.
### How was this patch tested?
- `./gradlew :api:test --tests org.apache.gravitino.tag.TestTagValuePair
-PskipITs -PskipDockerTests=false`
- `./gradlew :common:test --tests
org.apache.gravitino.dto.requests.TestTagCreateRequest --tests
org.apache.gravitino.dto.requests.TestTagsAssociateRequest --tests
org.apache.gravitino.dto.tag.TestTagDTO :core:test --tests
org.apache.gravitino.tag.TestTagManager --tests
org.apache.gravitino.hook.TestTagHookDispatcher --tests
org.apache.gravitino.listener.api.event.TestTagEvent -PskipITs
-PskipDockerTests=false`
--
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]