justinmclean commented on code in PR #5906:
URL: https://github.com/apache/gravitino/pull/5906#discussion_r1893270349
##########
clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java:
##########
@@ -378,27 +378,33 @@ private void handleTableCommand() {
String schema = name.getSchemaName();
Command.setAuthenticationMode(auth, userName);
+ List<String> missingEntities =
+ Stream.of(
+ catalog == null ? CommandEntities.CATALOG : null,
+ schema == null ? CommandEntities.SCHEMA : null)
+ .filter(Objects::nonNull)
+ .collect(Collectors.toList());
// Handle CommandActions.LIST action separately as it doesn't require the
`table`
if (CommandActions.LIST.equals(command)) {
- List<String> missingEntities =
- Stream.of(
- metalake == null ? CommandEntities.METALAKE : null,
- catalog == null ? CommandEntities.CATALOG : null,
- schema == null ? CommandEntities.SCHEMA : null)
- .filter(Objects::nonNull)
- .collect(Collectors.toList());
if (!missingEntities.isEmpty()) {
System.err.println(
"Missing required argument(s): " + Joiner.on(",
").join(missingEntities));
return;
}
-
newListTables(url, ignore, metalake, catalog, schema).handle();
return;
}
String table = name.getTableName();
+ if (Objects.isNull(table)) {
Review Comment:
why not use table == null?
--
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]