justinmclean commented on code in PR #6104:
URL: https://github.com/apache/gravitino/pull/6104#discussion_r1903530053
##########
clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetCatalogProperty.java:
##########
@@ -74,4 +74,12 @@ public void handle() {
System.out.println(catalog + " property set.");
}
+
+ @Override
+ public Command validate() {
+ if (property == null && value == null) exitWithError("Missing --property
and --value options.");
+ if (property == null) exitWithError(ErrorMessages.MISSING_PROPERTY);
+ if (value == null) exitWithError(ErrorMessages.MISSING_VALUE);
+ return this;
+ }
Review Comment:
Yes they could this method could be renamed and moved to Command and take a
property and value parameter to check. Both the validate methods of metalake
and catalog can then call it. Other future entities can also use it and that
will cut down a lot on future duplicated code.
--
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]