[Improvement] support batch API for tag operation
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 935
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 298
Description
### What would you like to be improved?
For the current tag API, listing metadata objects for a group of tags requires iteratively calling `tag.associatedObjects().objects()`, which is both inconvenient for users and costly in terms of performance. It would be better to add a batch API for tag operations.
### How should we improve?
we can add a batch API for such usage:
```
// for java
GravitinoClient client = ...
String[] tagNames = {"tag1", "tagN"}
MetadataObject[] objects = client.listMetadataObjectsForTags(tagNames);
// for rest
curl -X GET -H "Accept: application/vnd.gravitino.v1+json" \
http://localhost:8090/api/metalakes/test/tags/objects?tags=tag1,tag2,tag3
// response example:
{
"code": 0,
"metadataObjects": [
{
"type": "CATALOG",
"fullName": "my_catalog"
},
{
"type": "SCHEMA",
"fullName": "my_catalog.my_schema"
},
{
"type": "TABLE",
"fullName": "my_catalog.my_schema.my_table"
}
]
}
```
Contributor guide
Assessment
This issue has not been assessed yet.