jerryshao commented on code in PR #9430:
URL: https://github.com/apache/gravitino/pull/9430#discussion_r2650815125


##########
core/src/main/java/org/apache/gravitino/storage/relational/service/FilesetMetaService.java:
##########
@@ -125,13 +119,31 @@ public FilesetEntity 
getFilesetByIdentifier(NameIdentifier identifier) {
   public List<FilesetEntity> listFilesetsByNamespace(Namespace namespace) {
     NamespaceUtil.checkFileset(namespace);
 
-    Long schemaId =
-        EntityIdService.getEntityId(
-            NameIdentifier.of(namespace.levels()), Entity.EntityType.SCHEMA);
-
-    List<FilesetPO> filesetPOs =
-        SessionUtils.getWithoutCommit(
-            FilesetMetaMapper.class, mapper -> 
mapper.listFilesetPOsBySchemaId(schemaId));
+    List<FilesetPO> filesetPOs;
+    if (GravitinoEnv.getInstance().config().get(Configs.CACHE_ENABLED)) {
+      Long schemaId =
+          EntityIdService.getEntityId(
+              NameIdentifier.of(namespace.levels()), Entity.EntityType.SCHEMA);
+      filesetPOs =
+          SessionUtils.getWithoutCommit(
+              FilesetMetaMapper.class, mapper -> 
mapper.listFilesetPOsBySchemaId(schemaId));
+    } else {
+      String[] namespaceLevels = namespace.levels();
+      filesetPOs =
+          SessionUtils.getWithoutCommit(
+              FilesetMetaMapper.class,
+              mapper ->
+                  mapper.listFilesetPOsByFullQualifiedName(
+                      namespaceLevels[0], namespaceLevels[1], 
namespaceLevels[2]));
+      if (filesetPOs.isEmpty() || filesetPOs.get(0).getSchemaId() == null) {

Review Comment:
   Please give me an example to see.



-- 
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]

Reply via email to