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


##########
clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListCatalogs.java:
##########
@@ -35,29 +36,26 @@ public class ListCatalogs extends Command {
    * @param url The URL of the Gravitino server.
    * @param ignoreVersions If true don't check the client/server versions 
match.
    * @param metalake The name of the metalake.
+   * @param listOptions The list options.
    */
-  public ListCatalogs(String url, boolean ignoreVersions, String metalake) {
-    super(url, ignoreVersions);
+  public ListCatalogs(
+      String url, boolean ignoreVersions, String metalake, ListOptions 
listOptions) {
+    super(url, ignoreVersions, listOptions);
     this.metalake = metalake;
   }
 
   /** Lists all catalogs in a metalake. */
   @Override
   public void handle() {
-    String[] catalogs = new String[0];
+    Catalog[] catalogs;
     try {
       GravitinoClient client = buildClient(metalake);
-      catalogs = client.listCatalogs();
+      catalogs = client.listCatalogsInfo();
+      output(catalogs);

Review Comment:
   This is because the parameter's instance type in the `output` method of 
`TableFormat.java` and `PlainFormat.java` determines which instance to create. 
For example, if the parameter is an instance of `Catalog[]`, it will execute 
`new CatalogsTableFormat().output((Catalog[]) object);`. Is there any 
suggestions?



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