-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#6533] improvement(CLI): Add default values to column list output in CLI #6538
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@justinmclean could you please review this PR when you have time? I’d really appreciate your feedback. |
clients/cli/src/main/java/org/apache/gravitino/cli/outputs/LineUtil.java
Show resolved
Hide resolved
tengqm
reviewed
Feb 26, 2025
clients/cli/src/main/java/org/apache/gravitino/cli/outputs/LineUtil.java
Show resolved
Hide resolved
clients/cli/src/main/java/org/apache/gravitino/cli/outputs/PlainFormat.java
Show resolved
Hide resolved
@justinmclean @tengqm I’ve finished updating the code. Please take a look at the PR again when you have time. |
…put in CLI Add default values to column list output in CLI
…mand in Gravitino CLI to command fix some bugs.
50cb3a5
to
d76ace9
Compare
/lgtm |
justinmclean
approved these changes
Feb 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks
Abyss-lord
added a commit
to Abyss-lord/gravitino
that referenced
this pull request
Mar 2, 2025
…put in CLI (apache#6538) ### What changes were proposed in this pull request? improvement(CLI): Add default values to column list output in CLI ### Why are the changes needed? Fix: apache#6533 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? local test Hive Catalog ```bash gcli column list -m demo_metalake --name Hive_catalog.default.test_dates -i name,datatype,default_value,comment,nullable,auto_increment id,integer,,N/A,true,false event_date,date,,N/A,true, event_timestamp,timestamp,,N/A,true, gcli column list -m demo_metalake --name Hive_catalog.default.test_dates -i --output table +-----------------+-----------+---------+---------------+----------+---------+ | Name | Type | Default | AutoIncrement | Nullable | Comment | +-----------------+-----------+---------+---------------+----------+---------+ | id | integer | | false | true | N/A | | event_date | date | | | true | N/A | | event_timestamp | timestamp | | | true | N/A | +-----------------+-----------+---------+---------------+----------+---------+ gcli table details -m demo_metalake --name Hive_catalog.default.test_dates -i --output table +-----------------+-----------+---------+---------------+----------+---------+ | Name | Type | Default | AutoIncrement | Nullable | Comment | +-----------------+-----------+---------+---------------+----------+---------+ | id | integer | | false | true | N/A | | event_date | date | | | true | N/A | | event_timestamp | timestamp | | | true | N/A | +-----------------+-----------+---------+---------------+----------+---------+ ``` Mysql Catalog ```bash gcli column list -m demo_metalake --name Mysql_catalog.gravitino_db.catalog_meta -i name,datatype,default_value,comment,nullable,auto_increment catalog_id,long unsigned,,catalog id,false,false catalog_name,varchar(128),,catalog name,false, metalake_id,long unsigned,,metalake id,false,false type,varchar(64),,catalog type,false, provider,varchar(64),,catalog provider,false, catalog_comment,varchar(256),'',catalog comment,true, properties,external(MEDIUMTEXT),,catalog properties,true, audit_info,external(MEDIUMTEXT),,catalog audit info,false, current_version,integer unsigned,1,catalog current version,false,false last_version,integer unsigned,1,catalog last version,false,false deleted_at,long unsigned,0,catalog deleted at,false,false gcli column list -m demo_metalake --name Mysql_catalog.gravitino_db.catalog_meta -i --output table +-----------------+----------------------+---------+---------------+----------+-------------------------+ | Name | Type | Default | AutoIncrement | Nullable | Comment | +-----------------+----------------------+---------+---------------+----------+-------------------------+ | catalog_id | long unsigned | | false | false | catalog id | | catalog_name | varchar(128) | | | false | catalog name | | metalake_id | long unsigned | | false | false | metalake id | | type | varchar(64) | | | false | catalog type | | provider | varchar(64) | | | false | catalog provider | | catalog_comment | varchar(256) | '' | | true | catalog comment | | properties | external(MEDIUMTEXT) | | | true | catalog properties | | audit_info | external(MEDIUMTEXT) | | | false | catalog audit info | | current_version | integer unsigned | 1 | false | false | catalog current version | | last_version | integer unsigned | 1 | false | false | catalog last version | | deleted_at | long unsigned | 0 | false | false | catalog deleted at | +-----------------+----------------------+---------+---------------+----------+-------------------------+ ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
improvement(CLI): Add default values to column list output in CLI
Why are the changes needed?
Fix: #6533
Does this PR introduce any user-facing change?
No
How was this patch tested?
local test
Hive Catalog
Mysql Catalog