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


##########
core/src/main/java/org/apache/gravitino/tag/TagManager.java:
##########
@@ -352,6 +352,15 @@ public String[] associateTagsForMetadataObject(
                 }));
   }
 
+  private String getNewName(TagChange... changes) {
+    for (TagChange change : changes) {
+      if (change instanceof TagChange.RenameTag) {
+        return ((TagChange.RenameTag) change).getNewName();
+      }
+    }
+    return null;

Review Comment:
   I think you make things complicated, if it is the name conflict, the old 
name and new name should be the same, you can use the `name` passed in. Both 
getting the name from `TagChange` and `Exception` are too complex and not 
necessary just for getting a name.



-- 
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: commits-unsubscr...@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to