eric-maynard commented on code in PR #404:
URL: https://github.com/apache/polaris/pull/404#discussion_r1821661613
##########
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:
It's not true that we always exactly dump the json responses -- this is most
obvious with `list` commands, e.g. for listing catalogs we do:
```
for catalog in api.list_catalogs().catalogs:
print(catalog.to_json())
```
Having said that, I didn't realize the response came back as a JSON array. I
think that's probably fine, let's just leave it then 👍
--
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]