Skip to content
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

[FEATURE] Support table format output for SchemaDetails command #5957

Open
waukin opened this issue Dec 23, 2024 · 13 comments
Open

[FEATURE] Support table format output for SchemaDetails command #5957

waukin opened this issue Dec 23, 2024 · 13 comments
Assignees
Labels
feature New feature or request

Comments

@waukin
Copy link
Contributor

waukin commented Dec 23, 2024

Describe the feature

The current SchemaDetails command in the Gravitino CLI supports only plain format output.
I plan to add support for table format output to the SchemaDetails command.

Motivation

No response

Describe the solution

No response

Additional context

No response

@waukin waukin added the feature New feature or request label Dec 23, 2024
@Abyss-lord
Copy link
Contributor

I would like to work on it.

@waukin
Copy link
Contributor Author

waukin commented Dec 24, 2024

Hi @Abyss-lord, I’m halfway through implementing the feature. If you don’t mind, I’d like to continue working on it.

@Abyss-lord
Copy link
Contributor

Hi @Abyss-lord, I’m halfway through implementing the feature. If you don’t mind, I’d like to continue working on it.

that's ok, since you wrote the previous code, it would be great if you could continue working on it.

@waukin
Copy link
Contributor Author

waukin commented Dec 24, 2024

Hi @Abyss-lord, I’m halfway through implementing the feature. If you don’t mind, I’d like to continue working on it.

that's ok, since you wrote the previous code, it would be great if you could continue working on it.

Thank you for your understanding.

@waukin
Copy link
Contributor Author

waukin commented Dec 24, 2024

@xunliu please assign this issue to me.

@Abyss-lord
Copy link
Contributor

@waukin BTW, output method should accept string argument, Please amend it here.
image

@waukin
Copy link
Contributor Author

waukin commented Dec 24, 2024

@waukin BTW, output method should accept string argument, Please amend it here. image

@Abyss-lord, why does it need to accept string argument?

@Abyss-lord
Copy link
Contributor

@waukin BTW, output method should accept string argument, Please amend it here. image

@Abyss-lord, why does it need to accept string argument?

See this pr #5924 , If no data is available, a hint should be given They wanted to unify the output method.

@waukin
Copy link
Contributor Author

waukin commented Dec 24, 2024

Hi @Abyss-lord, I’m still confused about the requirement that the output method should accept string argument. In the previous implementation, the output method accepted different types of arguments, such as Metalake and Catalog. For example, you can refer to MetalakeDetails and CatalogDetails. Could you please provide a more detailed explanation?

@Abyss-lord
Copy link
Contributor

Hi @waukin , In the ListXXX method, if there is No data, CLI should give a hint, such as "No metalakes exist. "The current implementation is implemented by two methods: System.out.println and output. In #5942 , the reviewer wants to combine the implementation into a single method.

image

@waukin
Copy link
Contributor Author

waukin commented Dec 25, 2024

Hi @Abyss-lord, I see. We can handle that by having the output method accept a string argument and simply printing it. I'll open another issue to make it clearer.

@justinmclean
Copy link
Member

You can leave the existing method as output(catalogs) and just have that method output "No catalogs exist." if null is passed into it.

@waukin
Copy link
Contributor Author

waukin commented Dec 26, 2024

You can leave the existing method as output(catalogs) and just have that method output "No catalogs exist." if null is passed into it.

I’ve kept the existing method as output(catalogs). For the ListCatalogs command, if there are no catalogs, client.listCatalogsInfo() returns an empty array, not null. I’ve made some refactoring changes in this PR: #6015. If you have some free time, please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants