sunxiaojian commented on code in PR #5641:
URL: https://github.com/apache/gravitino/pull/5641#discussion_r1855404172


##########
clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java:
##########
@@ -444,44 +449,66 @@ protected void handleTagCommand() {
       }
     } else if (CommandActions.CREATE.equals(command)) {
       String comment = line.getOptionValue(GravitinoOptions.COMMENT);
-      new CreateTag(url, ignore, metalake, tag, comment).handle();
+      new CreateTag(url, ignore, metalake, tags, comment).handle();
     } else if (CommandActions.DELETE.equals(command)) {
       boolean force = line.hasOption(GravitinoOptions.FORCE);
-      new DeleteTag(url, ignore, force, metalake, tag).handle();
+      new DeleteTag(url, ignore, force, metalake, tags).handle();
     } else if (CommandActions.SET.equals(command)) {
       String property = line.getOptionValue(GravitinoOptions.PROPERTY);
       String value = line.getOptionValue(GravitinoOptions.VALUE);
-
       if (name == null && property != null && value != null) {
-        new SetTagProperty(url, ignore, metalake, tag, property, 
value).handle();
+        if (tags.length > 1) {

Review Comment:
   fixed



##########
clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java:
##########
@@ -444,44 +449,66 @@ protected void handleTagCommand() {
       }
     } else if (CommandActions.CREATE.equals(command)) {
       String comment = line.getOptionValue(GravitinoOptions.COMMENT);
-      new CreateTag(url, ignore, metalake, tag, comment).handle();
+      new CreateTag(url, ignore, metalake, tags, comment).handle();
     } else if (CommandActions.DELETE.equals(command)) {
       boolean force = line.hasOption(GravitinoOptions.FORCE);
-      new DeleteTag(url, ignore, force, metalake, tag).handle();
+      new DeleteTag(url, ignore, force, metalake, tags).handle();
     } else if (CommandActions.SET.equals(command)) {
       String property = line.getOptionValue(GravitinoOptions.PROPERTY);
       String value = line.getOptionValue(GravitinoOptions.VALUE);
-
       if (name == null && property != null && value != null) {
-        new SetTagProperty(url, ignore, metalake, tag, property, 
value).handle();
+        if (tags.length > 1) {
+          System.err.println(ErrorMessages.MULTIPLE_TAG_COMMAND_ERROR);
+          return;
+        }
+        new SetTagProperty(url, ignore, metalake, tags[0], property, 
value).handle();
       } else if (name != null && property == null && value == null) {
-        new TagEntity(url, ignore, metalake, name, tag).handle();
+        new TagEntity(url, ignore, metalake, name, tags).handle();
       } else {
         System.err.println(ErrorMessages.INVALID_SET_COMMAND);
       }
     } else if (CommandActions.REMOVE.equals(command)) {
       String property = line.getOptionValue(GravitinoOptions.PROPERTY);
       if (property != null) {
-        new RemoveTagProperty(url, ignore, metalake, tag, property).handle();
+        if (tags.length > 1) {

Review Comment:
   fixed



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