From a1d05b62bd89215ede01fb37ef5e529121f6721d Mon Sep 17 00:00:00 2001 From: waukin Date: Tue, 24 Dec 2024 21:05:39 +0800 Subject: [PATCH] fix: adjust format --- .../java/org/apache/gravitino/cli/TestableCommandLine.java | 7 ++++++- .../org/apache/gravitino/cli/commands/SchemaDetails.java | 7 ++++++- .../java/org/apache/gravitino/cli/outputs/TableFormat.java | 5 +---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/TestableCommandLine.java b/clients/cli/src/main/java/org/apache/gravitino/cli/TestableCommandLine.java index fb3e6b7a41d..b6816784d94 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/TestableCommandLine.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/TestableCommandLine.java @@ -259,7 +259,12 @@ protected SchemaAudit newSchemaAudit( } protected SchemaDetails newSchemaDetails( - String url, boolean ignore, String outputFormat, String metalake, String catalog, String schema) { + String url, + boolean ignore, + String outputFormat, + String metalake, + String catalog, + String schema) { return new SchemaDetails(url, ignore, outputFormat, metalake, catalog, schema); } diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SchemaDetails.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SchemaDetails.java index cf87296d37e..1f808df26d2 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SchemaDetails.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SchemaDetails.java @@ -44,7 +44,12 @@ public class SchemaDetails extends Command { * @param schema The name of the schenma. */ public SchemaDetails( - String url, boolean ignoreVersions, String outputFormat, String metalake, String catalog, String schema) { + String url, + boolean ignoreVersions, + String outputFormat, + String metalake, + String catalog, + String schema) { super(url, ignoreVersions, outputFormat); this.metalake = metalake; this.catalog = catalog; diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java b/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java index 1831f0ff3db..e436c086b3e 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java @@ -103,10 +103,7 @@ static final class SchemaTableFormat implements OutputFormat { public void output(Schema schema) { List headers = Arrays.asList("schema", "comment"); List> rows = new ArrayList<>(); - rows.add( - Arrays.asList( - schema.name(), - schema.comment())); + rows.add(Arrays.asList(schema.name(), schema.comment() + "")); TableFormatImpl tableFormat = new TableFormatImpl(); tableFormat.print(headers, rows); }