jerryshao commented on code in PR #6796:
URL: https://github.com/apache/gravitino/pull/6796#discussion_r2028057476
##########
clients/client-python/gravitino/client/generic_model_catalog.py:
##########
@@ -269,6 +272,40 @@ def get_model_version_by_alias(
return GenericModelVersion(model_version_resp.model_version())
+ def alter_model(self, model_ident: NameIdentifier, *changes: ModelChange)
-> Model:
+ """Alter the schema by applying the changes.
+ Args:
+ model_ident: The identifier of the model.
+ changes: The changes to apply to the model.
+ Raises:
+ NoSuchSchemaException: If the schema does not exist.
+ IllegalArgumentException: If the changes are invalid.
+ Returns:
+ The updated schema object.
+ """
+ self._check_model_ident(model_ident)
+ model_full_ns = self._model_full_namespace(model_ident.namespace())
+
+ update_requests = [
+ GenericModelCatalog.to_model_update_request(change) for change in
changes
+ ]
+
+ req = ModelUpdatesRequest(update_requests)
+ req.validate()
+
+ print(
+
f"{self._format_model_request_path(model_full_ns)}/{encode_string(model_ident.name())}"
+ )
Review Comment:
Please remove this print log.
--
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]