Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[apache#5808] fix(CLI): Fix improper exception throwing When a malfor…
…med name is passed to the CLI command (apache#5836) ### What changes were proposed in this pull request? No exception should be thrown when a malformed name is passed to the CLI. Currently, passing a malformed name causes an IllegalNamespaceException. I’ve added error messages to inform the user when necessary arguments are missing. Additionally, the `FullName.getNamePart()` method no longer prints error messages, as the information it provides is limited. I think performing fine-grained argument validation in each method and providing specific hints is a better way to hint users. ### Why are the changes needed? Fix: apache#5808 ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? ```bash bin/gcli.sh table list -i # output: Missing required argument(s): METALAKE, CATALOG, SCHEMA bin/gcli.sh table list -i --metalake demo_metalake # output: Missing required argument(s): CATALOG, SCHEMA bin/gcli.sh table list -i --metalake demo_metalake --name Hive_catalog # output: Missing required argument(s): SCHEMA bin/gcli.sh table list -i --metalake demo_metalake --name Hive_catalog.default # output: correct result ```
- Loading branch information