Skip to content

Commit

Permalink
[apache#5333] Add column title row to table column output in Gravitin…
Browse files Browse the repository at this point in the history
…o CLI (apache#5350)

### What changes were proposed in this pull request?

Add column title row to table column output.

### Why are the changes needed?

So it's easier for a user to understand the output.

Fix: apache#5333

### Does this PR introduce _any_ user-facing change?

N/A

### How was this patch tested?

Compiled and tested locally.
  • Loading branch information
justinmclean authored Nov 8, 2024
1 parent eb3b6db commit f3fed4a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ public void handle() {
String name = columns[i].name();
String dataType = columns[i].dataType().simpleString();
String comment = columns[i].comment();
String nullable = columns[i].nullable() ? "null" : "";
String autoIncrement = columns[i].autoIncrement() ? "auto" : "";
String nullable = columns[i].nullable() ? "true" : "false";
String autoIncrement = columns[i].autoIncrement() ? "true" : "false";

if (i == 0) {
all.append("name,datatype,comment,nullable,auto_increment" + System.lineSeparator());
}
// TODO default values
all.append(
name
Expand Down

0 comments on commit f3fed4a

Please sign in to comment.