qqqttt123 commented on code in PR #9815:
URL: https://github.com/apache/gravitino/pull/9815#discussion_r2741174993


##########
core/src/main/java/org/apache/gravitino/storage/relational/JDBCBackend.java:
##########
@@ -200,6 +204,14 @@ public <E extends Entity & HasIdentifier> void insert(E e, 
boolean overwritten)
       
JobTemplateMetaService.getInstance().insertJobTemplate((JobTemplateEntity) e, 
overwritten);
     } else if (e instanceof JobEntity) {
       JobMetaService.getInstance().insertJob((JobEntity) e, overwritten);
+    } else if (e instanceof GenericEntity) {
+      GenericEntity genericEntity = (GenericEntity) e;
+      if (genericEntity.type() == Entity.EntityType.VIEW) {
+        ViewMetaService.getInstance().insertView(genericEntity, overwritten);
+      } else {
+        throw new UnsupportedEntityTypeException(
+            "Unsupported entity type: %s for insert operation", 
genericEntity.type());
+      }

Review Comment:
   To prevent others from incorrect modification.



-- 
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]

Reply via email to