eric-maynard commented on code in PR #404:
URL: https://github.com/apache/polaris/pull/404#discussion_r1816032984
##########
regtests/client/python/cli/command/catalogs.py:
##########
@@ -176,22 +176,29 @@ def execute(self, api: PolarisDefaultApi) -> None:
print(catalog.to_json())
elif self.catalogs_subcommand == Subcommands.UPDATE:
catalog = api.get_catalog(self.catalog_name)
+
if self.default_base_location or self.properties:
+ new_default_base_location = self.default_base_location or
catalog.properties.default_base_location
+ new_additional_properties =
catalog.properties.additional_properties.copy()
+ if self.properties:
+ new_additional_properties.update(self.properties)
Review Comment:
nit: The pattern used
[elsewhere](https://github.com/apache/polaris/blob/301dc14f46986638f7c65fec28e6b55611221a58/regtests/client/python/cli/command/namespaces.py#L76)
is like:
```
properties = {**properties, Arguments.LOCATION: self.location}
```
Although now that I look there, I think there's a bug where it uses
`self.properties` instead of `properties`. Want o piggyback a fix on this PR?
##########
regtests/client/python/cli/command/catalogs.py:
##########
@@ -176,22 +176,29 @@ def execute(self, api: PolarisDefaultApi) -> None:
print(catalog.to_json())
elif self.catalogs_subcommand == Subcommands.UPDATE:
catalog = api.get_catalog(self.catalog_name)
+
if self.default_base_location or self.properties:
+ new_default_base_location = self.default_base_location or
catalog.properties.default_base_location
+ new_additional_properties =
catalog.properties.additional_properties.copy()
+ if self.properties:
+ new_additional_properties.update(self.properties)
Review Comment:
nit: The pattern used
[elsewhere](https://github.com/apache/polaris/blob/301dc14f46986638f7c65fec28e6b55611221a58/regtests/client/python/cli/command/namespaces.py#L76)
is like:
```
properties = {**properties, Arguments.LOCATION: self.location}
```
Although now that I look there, I think there's a bug where it uses
`self.properties` instead of `properties`. Want to piggyback a fix on this PR?
--
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]