dennishuo commented on code in PR #404:
URL: https://github.com/apache/polaris/pull/404#discussion_r1821536568
##########
regtests/client/python/cli/command/namespaces.py:
##########
@@ -91,7 +91,8 @@ def execute(self, api: PolarisDefaultApi) -> None:
elif self.namespaces_subcommand == Subcommands.DELETE:
catalog_api.drop_namespace(prefix=self.catalog,
namespace=UNIT_SEPARATOR.join(self.namespace))
elif self.namespaces_subcommand == Subcommands.GET:
- catalog_api.namespace_exists(prefix=self.catalog,
namespace=UNIT_SEPARATOR.join(self.namespace))
- print(json.dumps({"namespace": '.'.join(self.namespace)}))
+ print(catalog_api.load_namespace_metadata(
+ prefix=self.catalog,
+ namespace=UNIT_SEPARATOR.join(self.namespace)).to_json())
Review Comment:
Here the UNIT_SEPARATOR is actually just for the input argument to the API
call; the main change here is for consistency with the other `get` commands, we
now just dump the actual full JSON response.
In practice it means the `namespace` field becomes a json array.
I'd say we can eventually have two modes:
1. Dump json responses (current behavior of all the commands)
2. Pretty-print responses - maybe in a table layout or similar, and we can
have syntactic sugar of showing dot-separated namespace hierarchies
--
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]