mchades commented on code in PR #14147:
URL: https://github.com/apache/gravitino/pull/14147#discussion_r4408645879
##########
clients/client-python/gravitino/api/semantic/semantic_model_catalog.py:
##########
@@ -55,6 +56,45 @@ def list_semantic_models(self, namespace: Namespace) ->
list[NameIdentifier]:
NoSuchSchemaException: If the schema does not exist.
"""
+ def list_metrics(self, namespace: Namespace) -> list[NameIdentifier]:
+ """List visible metric identifiers across the Semantic Models in a
schema.
+
+ Identifiers are relative to this catalog. Each identifier's namespace
+ contains the schema and Semantic Model names, and its name is the exact
+ metric name.
+ Results are ordered by model identifier and then case-sensitive metric
name.
+
+ Args:
+ namespace (Namespace): A single-level schema namespace.
+
+ Returns:
+ list[NameIdentifier]: The visible metric identifiers, or an empty
list.
+
+ Raises:
+ NoSuchSchemaException: If the schema does not exist.
+ UnsupportedOperationException: If metric discovery is not
supported.
+ """
+ raise UnsupportedOperationException("Metric discovery is not
supported")
+
+ def list_metric_infos(self, namespace: Namespace) ->
list[SemanticModelMetric]:
+ """List complete visible metrics across the Semantic Models in a
schema.
+
+ Each result contains a namespace of schema and model names and the
complete
+ metric definition. Visibility and ordering match :meth:`list_metrics`.
+ The request fails as a whole if metric definitions cannot be decoded.
+
+ Args:
+ namespace (Namespace): A single-level schema namespace.
+
+ Returns:
+ list[SemanticModelMetric]: The visible metrics, or an empty list.
+
+ Raises:
+ NoSuchSchemaException: If the schema does not exist.
+ UnsupportedOperationException: If metric discovery is not
supported.
+ """
+ raise UnsupportedOperationException("Metric discovery is not
supported")
Review Comment:
Aligned the default messages with the Java API and updated the tests to
check each method's message.
--
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]