jerqi commented on code in PR #4055:
URL: https://github.com/apache/gravitino/pull/4055#discussion_r1759642117


##########
core/src/main/java/org/apache/gravitino/storage/relational/mapper/UserMetaBaseSQLProvider.java:
##########
@@ -138,6 +138,21 @@ public String listUsersByRoleId(@Param("roleId") Long 
roleId) {
         + " AND us.deleted_at = 0 AND re.deleted_at = 0";
   }
 
+  public String listUserPOsByMetalake(@Param("metalakeName") String 
metalakeName) {
+    return "SELECT ut.user_id as userId, ut.user_name as userName,"
+        + " ut.metalake_id as metalakeId,"
+        + " ut.audit_info as auditInfo,"
+        + " ut.current_version as currentVersion, ut.last_version as 
lastVersion,"
+        + " ut.deleted_at as deletedAt"
+        + " FROM "
+        + USER_TABLE_NAME
+        + " ut JOIN "
+        + MetalakeMetaMapper.TABLE_NAME
+        + " mt ON ut.metalake_id = mt.metalake_id"
+        + " WHERE mt.metalake_name = #{metalakeName}"
+        + " AND ut.deleted_at = 0 AND mt.deleted_at = 0";
+  }

Review Comment:
   Added the `checkMetalakeExists`.



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