tengqm commented on code in PR #5939:
URL: https://github.com/apache/gravitino/pull/5939#discussion_r1894825652
##########
clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java:
##########
@@ -318,14 +319,29 @@ private void handleSchemaCommand() {
String catalog = name.getCatalogName();
Command.setAuthenticationMode(auth, userName);
+ List<String> missingEntities = Lists.newArrayList();
+ if (metalake == null) missingEntities.add(CommandEntities.METALAKE);
+ if (catalog == null) missingEntities.add(CommandEntities.CATALOG);
// Handle the CommandActions.LIST action separately as it doesn't use
`schema`
if (CommandActions.LIST.equals(command)) {
+ if (!missingEntities.isEmpty()) {
+ System.err.println("Missing required argument(s): " +
COMMA_JOINER.join(missingEntities));
+ Main.exit(-1);
+ }
newListSchema(url, ignore, metalake, catalog).handle();
return;
}
Review Comment:
Can we move this handling of LIST command "back" to the switch case clause
below?
--
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]