jerryshao commented on code in PR #7881:
URL: https://github.com/apache/gravitino/pull/7881#discussion_r2253018279


##########
catalogs/catalog-model/src/main/java/org/apache/gravitino/catalog/model/ModelCatalogOperations.java:
##########
@@ -614,6 +625,18 @@ private void doRemoveProperty(
     entityProperties.remove(change.property());
   }
 
+  private void doUpdateUri(Map<String, String> entityUris, 
ModelVersionChange.UpdateUri change) {
+    entityUris.replace(change.uriName(), change.newUri());
+  }
+
+  private void doAddUri(Map<String, String> entityUris, 
ModelVersionChange.AddUri change) {
+    entityUris.putIfAbsent(change.uriName(), change.uri());
+  }
+
+  private void doRemoveUri(Map<String, String> entityUris, 
ModelVersionChange.RemoveUri change) {
+    entityUris.remove(change.uriName());
+  }

Review Comment:
   What are the behaviors if:
   
   1. The update URI name doesn't exist.
   2. The added URI name already exists.
   3. The removed URI doesn't exist.
   
   Shall we throw an exception, or do it silently, what do you think?



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