Skip to content

Commit

Permalink
[Minor] improvement to Partition Gravitino CLI code (#5617)
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

Minor improvements to Partition Gravitino CLI code.

### Why are the changes needed?

Remove duplicate short command code and make the same style as other
options.

Fix: # N/A

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

No

### How was this patch tested?

Tested locally
  • Loading branch information
justinmclean authored Nov 20, 2024
1 parent d8a6ff8 commit 092f58a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ private void handleTableCommand() {
new ListIndexes(url, ignore, metalake, catalog, schema, table).handle();
} else if (line.hasOption(GravitinoOptions.DISTRIBUTION)) {
new TableDistribution(url, ignore, metalake, catalog, schema, table).handle();
} else if (line.hasOption(GravitinoOptions.Partition)) {
} else if (line.hasOption(GravitinoOptions.PARTITION)) {
new TablePartition(url, ignore, metalake, catalog, schema, table).handle();
} else {
new TableDetails(url, ignore, metalake, catalog, schema, table).handle();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class GravitinoOptions {
public static final String INDEX = "index";
public static final String FORCE = "force";
public static final String DISTRIBUTION = "distribution";
public static final String Partition = "partition";
public static final String PARTITION = "partition";

/**
* Builds and returns the CLI options for Gravitino.
Expand All @@ -66,7 +66,7 @@ public Options options() {
options.addOption(createSimpleOption("a", AUDIT, "display audit information"));
options.addOption(createSimpleOption("x", INDEX, "Display index infromation"));
options.addOption(createSimpleOption("d", DISTRIBUTION, "Display distribution information"));
options.addOption(createSimpleOption("p", Partition, "Display partition information"));
options.addOption(createSimpleOption(null, PARTITION, "Display partition information"));

// Create/update options
options.addOption(createArgOption(null, RENAME, "new entity name"));
Expand Down

0 comments on commit 092f58a

Please sign in to comment.