jerqi commented on code in PR #7726:
URL: https://github.com/apache/gravitino/pull/7726#discussion_r2209458660
##########
server/src/main/java/org/apache/gravitino/server/web/rest/CatalogOperations.java:
##########
@@ -103,23 +103,24 @@ public Response listCatalogs(
// Lock the root and the metalake with WRITE lock to ensure the
consistency of the list.
if (verbose) {
Catalog[] catalogs =
catalogDispatcher.listCatalogsInfo(catalogNS);
- Arrays.stream(catalogs)
- .filter(
- catalog -> {
- NameIdentifier[] nameIdentifiers =
- new NameIdentifier[] {
- NameIdentifierUtil.ofCatalog(metalake,
catalog.name())
- };
- return MetadataFilterHelper.filterByExpression(
- metalake,
- loadCatalogAuthorizationExpression,
- Entity.EntityType.CATALOG,
- nameIdentifiers)
- .length
- > 0;
- })
- .collect(Collectors.toList())
- .toArray(new Catalog[0]);
+ catalogs =
Review Comment:
Could you add a UT for this case?
--
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]