xunliu commented on code in PR #5759:
URL: https://github.com/apache/gravitino/pull/5759#discussion_r1870574744


##########
clients/cli/src/main/java/org/apache/gravitino/cli/outputs/PlainFormat.java:
##########
@@ -33,6 +33,8 @@ public static void output(Object object) {
       new MetalakesStringFormat().output((Metalake[]) object);
     } else if (object instanceof Catalog) {
       new CatalogStringFormat().output((Catalog) object);
+    } else if (object instanceof Catalog[]) {
+      new CatalogsStringFormat().output((Catalog[]) object);

Review Comment:
   Please change `CatalogsStringFormat` to `CatalogsPlainFormat`,  and 
`MetalakesStringFormat `, `CatalogStringFormat ` and other `*StringFormat` class



##########
clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java:
##########
@@ -79,6 +81,19 @@ public void output(Catalog catalog) {
     }
   }
 
+  static final class CatalogsTableFormat implements OutputFormat<Catalog[]> {
+    @Override
+    public void output(Catalog[] catalogs) {
+      List<String> headers = Collections.singletonList("catalog");
+      List<List<String>> rows = new ArrayList<>();
+      for (int i = 0; i < catalogs.length; i++) {
+        rows.add(Arrays.asList(catalogs[i].name()));

Review Comment:
   I think we can display more filed values, just like `type()`, `provider()`, 
`comment` and `properties()`.



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