Abyss-lord opened a new pull request, #5939:
URL: https://github.com/apache/gravitino/pull/5939
<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
Examples:
- "[#123] feat(operator): support xxx"
- "[#233] fix: check null before access result in xxx"
- "[MINOR] refactor: fix typo in variable name"
- "[MINOR] docs: fix typo in README"
- "[#255] test: fix flaky test NameOfTheTest"
Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->
### What changes were proposed in this pull request?
Fix schema arguments validation just like table commands. running command
like `gcli schema details --metalake metalake_demo --name catalog_postgres -I`
give Missleading error message as below.
```bash
Malformed entity name.
Invalid string to encode: null
```
It should display a friendly error message.
### Why are the changes needed?
Fix: #5926
### Does this PR introduce _any_ user-facing change?
NO
### How was this patch tested?
```bash
bin/gcli.sh schema details --m demo_metalake -i
# output
# Missing --name option.
# Missing --name option.
# Missing required argument(s): catalog, schema
bin/gcli.sh schema details --m demo_metalake --name Hive_catalog -i
# output
# Malformed entity name.
# Missing required argument(s): schema
bin/gcli.sh schema details --m demo_metalake --name Hive_catalog.default -i
# ouput: default,Default Hive database
bin/gcli.sh schema list --m demo_metalake -i
# output:
# Missing --name option.
# Missing required argument(s): catalog
bin/gcli.sh schema list --m demo_metalake -i --name Hive_catalog
# correct output
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]