jerqi commented on code in PR #6455:
URL: https://github.com/apache/gravitino/pull/6455#discussion_r1955953007
##########
core/src/main/java/org/apache/gravitino/storage/relational/service/RoleMetaService.java:
##########
@@ -394,4 +443,50 @@ private static MetadataObject.Type getType(String type) {
private static String getEntityType(SecurableObject securableObject) {
return securableObject.type().name();
}
+
+ public static Map<Long, String> getFilesetObjectFullNames(List<Long> ids) {
+ List<FilesetPO> filesetPOs =
+ SessionUtils.getWithoutCommit(
+ FilesetMetaMapper.class, mapper ->
mapper.listFilesetPOsByFilesetIds(ids));
+
+ if (filesetPOs == null || filesetPOs.isEmpty()) {
+ return new HashMap<>();
+ }
+
+ List<Long> catalogIds =
+
filesetPOs.stream().map(FilesetPO::getCatalogId).collect(Collectors.toList());
+ List<Long> schemaIds =
+
filesetPOs.stream().map(FilesetPO::getSchemaId).collect(Collectors.toList());
+
+ Map<Long, String> catalogIdAndNameMap = getCatalogIdAndNameMap(catalogIds);
+ Map<Long, String> schemaIdAndNameMap = getSchemaIdAndNameMap(schemaIds);
+
+ HashMap<Long, String> filesetIdAndNameMap = new HashMap<>();
+
+ filesetPOs.forEach(
+ filesetPO -> {
+ String catalogName =
catalogIdAndNameMap.get(filesetPO.getCatalogId());
Review Comment:
Will catalogName or schemaName be null if catalog or schema is deleted?
--
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]