eric-maynard commented on code in PR #1555: URL: https://github.com/apache/polaris/pull/1555#discussion_r2105649785
########## polaris-core/src/main/java/org/apache/polaris/core/persistence/AtomicOperationMetaStoreManager.java: ########## @@ -707,15 +707,15 @@ private void revokeGrantRecord( ? 0l : catalogPath.get(catalogPath.size() - 1).getId(); Page<EntityNameLookupRecord> resultPage = - ms.listEntities(callCtx, catalogId, parentId, entityType, pageToken); + ms.listEntities(callCtx, catalogId, parentId, entityType, pageRequest); // prune the returned list with only entities matching the entity subtype if (entitySubType != PolarisEntitySubType.ANY_SUBTYPE) { resultPage = - pageToken.buildNextPage( - resultPage.items.stream() - .filter(rec -> rec.getSubTypeCode() == entitySubType.getCode()) - .collect(Collectors.toList())); + resultPage.filter( Review Comment: In metastores where it matters like `JdbcBasePersistenceImpl`, we do exactly that by pushing the filter down. This is therefore currently modeled a persistence concern though, not a MetastoreManager concern. FWIW, this method is very rarely called and soon I think it will never be called. -- 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: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org