justinmclean commented on code in PR #5293:
URL: https://github.com/apache/gravitino/pull/5293#discussion_r1859885493


##########
clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java:
##########
@@ -210,7 +224,19 @@ private void handleCatalogCommand() {
     } else if (CommandActions.SET.equals(command)) {
       String property = line.getOptionValue(GravitinoOptions.PROPERTY);
       String value = line.getOptionValue(GravitinoOptions.VALUE);
-      newSetCatalogProperty(url, ignore, metalake, catalog, property, 
value).handle();
+      String entityName = line.getOptionValue(GravitinoOptions.NAME);
+      String owner = line.getOptionValue(GravitinoOptions.USER);
+      String group = line.getOptionValue(GravitinoOptions.GROUP);
+
+      if (owner != null && group == null) {
+        newSetOwner(url, ignore, metalake, entityName, entity, owner, 
false).handle();
+      } else if (owner == null && group != null) {
+        newSetOwner(url, ignore, metalake, entityName, entity, group, 
true).handle();
+      } else if (property != null && value != null) {
+        newSetCatalogProperty(url, ignore, metalake, catalog, property, 
value).handle();
+      } else {
+        System.err.println(ErrorMessages.INVALID_SET_COMMAND);
+      }

Review Comment:
   I agree. I'll do that on another issue/PR and look into the best way.



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