mchades commented on code in PR #12603:
URL: https://github.com/apache/gravitino/pull/12603#discussion_r4118833086
##########
core/src/main/java/org/apache/gravitino/storage/relational/service/SemanticModelPOStorageOps.java:
##########
@@ -80,6 +88,38 @@ public SemanticModelPO getPOByFullName(
return po;
}
+ @Override
+ public List<SemanticModelPO> listPOs(SemanticModelMetaMapper mapper, Long
parentId) {
+ return mapper.listSemanticModelPOsBySchemaId(parentId);
+ }
+
+ @Override
+ public List<SemanticModelPO> listPOs(
+ SemanticModelMetaMapper mapper, List<Long> semanticModelIds) {
+ return mapper.listSemanticModelPOsBySemanticModelIds(semanticModelIds);
+ }
+
+ @Override
+ public List<SemanticModelPO> listPOsByNSFullName(
+ SemanticModelMetaMapper mapper, Namespace namespace) {
+ List<SemanticModelPO> pos =
+ mapper.listSemanticModelPOsByFullQualifiedName(
+ namespace.level(0), namespace.level(1), namespace.level(2));
+ if (pos.isEmpty()) {
+ throw new NoSuchEntityException(
+ NoSuchEntityException.NO_SUCH_ENTITY_MESSAGE,
+ Entity.EntityType.CATALOG.name().toLowerCase(Locale.ROOT),
+ namespace.level(1));
+ }
+ if (pos.get(0).getSchemaId() == null) {
+ throw new NoSuchEntityException(
+ NoSuchEntityException.NO_SUCH_ENTITY_MESSAGE,
+ Entity.EntityType.SCHEMA.name().toLowerCase(Locale.ROOT),
+ namespace.level(2));
Review Comment:
Added explicit list-route coverage for both cache modes in 468028ab53. The
full-name route now verifies the missing-catalog and missing-schema messages
and that an existing empty schema returns an empty list.
TestSemanticModelJDBCBackend passes on H2, MySQL, and PostgreSQL (33/33).
--
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]