mchades commented on code in PR #14147:
URL: https://github.com/apache/gravitino/pull/14147#discussion_r4407974500
##########
clients/client-python/gravitino/client/semantic_model_catalog_operations.py:
##########
@@ -291,6 +329,21 @@ def _format_semantic_model_request_path(namespace:
Namespace) -> str:
"/semantic-models"
)
+ @staticmethod
+ def _format_metric_request_path(namespace: Namespace) -> str:
+ return (
+ f"api/metalakes/{encode_string(namespace.level(0))}"
+ f"/catalogs/{encode_string(namespace.level(1))}"
+ f"/schemas/{encode_string(namespace.level(2))}"
+ "/semantic-model-metrics"
+ )
+
+ @staticmethod
+ def _relative_metric_namespace(namespace: Namespace) -> Namespace:
+ if namespace is None or namespace.length() != 4:
+ raise IllegalArgumentException("Metric namespace must have 4
levels")
Review Comment:
The error now includes the expected namespace shape and actual level count.
Added assertions for the diagnostic message in both discovery modes.
--
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]