yuqi1129 commented on code in PR #6540:
URL: https://github.com/apache/gravitino/pull/6540#discussion_r1971634037
##########
core/src/main/java/org/apache/gravitino/storage/relational/mapper/provider/base/CatalogMetaBaseSQLProvider.java:
##########
@@ -22,10 +22,57 @@
import static
org.apache.gravitino.storage.relational.mapper.CatalogMetaMapper.TABLE_NAME;
import java.util.List;
+import org.apache.gravitino.storage.relational.mapper.MetalakeMetaMapper;
+import org.apache.gravitino.storage.relational.mapper.SchemaMetaMapper;
import org.apache.gravitino.storage.relational.po.CatalogPO;
import org.apache.ibatis.annotations.Param;
public class CatalogMetaBaseSQLProvider {
+ public String listCatalogPOsByMetalakeName(@Param("metalakeName") String
metalakeName) {
+ return "SELECT cm.catalog_id as catalogId, cm.catalog_name as catalogName,"
+ + " cm.metalake_id as metalakeId, cm.type, cm.provider,"
+ + " cm.catalog_comment as catalogComment, cm.properties, cm.audit_info
as auditInfo,"
+ + " cm.current_version as currentVersion, cm.last_version as
lastVersion,"
+ + " cm.deleted_at as deletedAt"
+ + " FROM "
+ + TABLE_NAME
+ + " cm JOIN "
+ + MetalakeMetaMapper.TABLE_NAME
+ + " mm ON cm.metalake_id = mm.metalake_id"
+ + " WHERE mm.metalake_name = #{metalakeName}"
+ + " AND mm.deleted_at = 0 AND cm.deleted_at = 0";
+ }
+
+ public String listCatalogPOsByCatalogName(@Param("catalogName") String
catalogName) {
Review Comment:
Is there a scenario which we need to get all catalogs with the name
`catalogName` in all metalakes?
--
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]