flyrain commented on code in PR #2261:
URL: https://github.com/apache/polaris/pull/2261#discussion_r2255541412
##########
runtime/service/src/main/java/org/apache/polaris/service/admin/PolarisAdminService.java:
##########
@@ -200,6 +205,43 @@ private Optional<CatalogRoleEntity>
findCatalogRoleByName(String catalogName, St
.map(path -> CatalogRoleEntity.of(path.getRawLeafEntity()));
}
+ private <T> Stream<T> loadEntities(
+ @Nonnull PolarisEntityType entityType,
+ @Nonnull PolarisEntitySubType entitySubType,
+ @Nullable PolarisEntity catalogEntity,
+ @Nonnull Function<PolarisBaseEntity, T> transformer) {
+ List<PolarisEntityCore> catalogPath;
+ long catalogId;
+ if (catalogEntity == null) {
+ catalogPath = null;
+ catalogId = 0;
+ } else {
+ catalogPath = PolarisEntity.toCoreList(List.of(catalogEntity));
+ catalogId = catalogEntity.getId();
+ }
+ // TODO: add loadEntities method to PolarisMetaStoreManager
Review Comment:
Minor: We will need a discussion on how persistence layer is going to
support it, as it affects all types of persistence. Loading everything in one
call can provide a consistent view, which is nice, but there are some caveats
that the uber call may be too large, so that it hits the limits(e.g., memory
limit). With that, I think it's premature to consider this as a `TODO` item.
--
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]