unknowntpo commented on code in PR #6847:
URL: https://github.com/apache/gravitino/pull/6847#discussion_r2072570652


##########
clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java:
##########
@@ -727,4 +735,83 @@ public String getOutput(org.apache.gravitino.rel.Column[] 
columns) {
           columnComment);
     }
   }
+
+  /**
+   * Formats a single {@link org.apache.gravitino.tag.Tag} instance into a 
two-column table display.
+   * Displays tag details including name and comment information.
+   */
+  static final class TagDetailsTableFormat extends TableFormat<Tag> {
+    public TagDetailsTableFormat(CommandContext context) {
+      super(context);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public String getOutput(Tag tag) {
+      Column columnName = new Column(context, "name");
+      Column columnComment = new Column(context, "comment");
+
+      columnName.addCell(tag.name());
+      columnComment.addCell(
+          tag.comment() == null || tag.comment().isEmpty() ? "N/A" : 
tag.comment());

Review Comment:
   done.



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