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


##########
core/src/main/java/org/apache/gravitino/storage/relational/mapper/provider/base/FilesetMetaBaseSQLProvider.java:
##########
@@ -43,6 +46,62 @@ public String listFilesetPOsBySchemaId(@Param("schemaId") 
Long schemaId) {
         + " WHERE fm.schema_id = #{schemaId} AND fm.deleted_at = 0 AND 
vi.deleted_at = 0";
   }
 
+  public String listFilesetPOsByFullQualifiedName(
+      @Param("metalakeName") String metalakeName,
+      @Param("catalogName") String catalogName,
+      @Param("schemaName") String schemaName) {
+    return """
+        SELECT
+            mm.metalake_id,
+            cm.catalog_id,
+            sm.schema_id,
+            vi.fileset_id,
+            fm.fileset_name,
+            fm.type,
+            fm.audit_info,
+            fm.current_version,
+            fm.last_version,
+            fm.deleted_at,
+            vi.id,
+            vi.metalake_id as version_metalake_id,
+            vi.catalog_id as version_catalog_id,
+            vi.schema_id as version_schema_id,
+            vi.fileset_id as version_fileset_id,
+            vi.version,
+            vi.fileset_comment,
+            vi.properties,
+            vi.storage_location_name,
+            vi.storage_location,
+            vi.deleted_at as version_deleted_at
+        FROM
+            %s mm
+        INNER JOIN
+            %s cm ON mm.metalake_id = cm.metalake_id
+            AND cm.catalog_name = #{catalogName}
+            AND cm.deleted_at = 0
+        LEFT JOIN
+            %s sm ON cm.catalog_id = sm.catalog_id
+            AND sm.schema_name = #{schemaName}
+            AND sm.deleted_at = 0
+        LEFT JOIN
+            %s fm ON sm.schema_id = fm.schema_id

Review Comment:
   Schema is required for table, topic and fileset.



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