jerryshao commented on code in PR #7424:
URL: https://github.com/apache/gravitino/pull/7424#discussion_r2160642905
##########
core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java:
##########
@@ -1198,4 +1210,32 @@ private CatalogEntity.Builder updateEntity(
return builder.withProperties(newProps);
}
+
+ private CatalogEntity convertFilesetCatalogEntity(CatalogEntity entity) {
+ if (entity.getType() != FILESET) {
+ return entity;
+ } else if (!entity.getProvider().equalsIgnoreCase("hadoop")) {
+ // If the provider is not "hadoop", we can return the entity as is.
+ return entity;
+ } else {
+ // If the provider is not "fileset", we need to convert it to a fileset
catalog entity.
+ // This is a special case to maintain compatibility.
+ return CatalogEntity.builder()
+ .withId(entity.id())
+ .withName(entity.name())
+ .withNamespace(entity.namespace())
+ .withType(FILESET)
+ .withProvider("fileset")
+ .withComment(entity.getComment())
+ .withProperties(entity.getProperties())
+ .withAuditInfo(
+ AuditInfo.builder()
+ .withCreator(entity.auditInfo().creator())
+ .withCreateTime(entity.auditInfo().createTime())
+ .withLastModifier(entity.auditInfo().lastModifier())
+ .withLastModifiedTime(entity.auditInfo().lastModifiedTime())
+ .build())
+ .build();
+ }
+ }
Review Comment:
OK, let me change it.
--
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]