lsyulong commented on issue #7728:
URL: https://github.com/apache/gravitino/issues/7728#issuecomment-3076479391
Catalog[] filteredCatalogs = 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]);
Response response = Utils.ok(new
CatalogListResponse(DTOConverters.toDTOs(filteredCatalogs)));
LOG.info("List {} catalogs info under metalake: {}",
filteredCatalogs.length, metalake);
return response;
@yunchipang You see this is not a good point, assign the filtered result to
a variable and use it in the response
--
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]