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


##########
core/src/main/java/org/apache/gravitino/storage/relational/mapper/provider/base/RoleMetaBaseSQLProvider.java:
##########
@@ -192,4 +193,20 @@ public String deleteRoleMetasByLegacyTimeline(
         + ROLE_TABLE_NAME
         + " WHERE deleted_at > 0 AND deleted_at < #{legacyTimeline} LIMIT 
#{limit}";
   }
+
+  public String touchRoleUpdatedAt(@Param("roleId") long roleId, @Param("now") 
long now) {
+    return "UPDATE " + ROLE_TABLE_NAME + " SET updated_at = #{now} WHERE 
role_id = #{roleId}";
+  }
+
+  public String batchGetRoleUpdatedAt(@Param("roleIds") List<Long> roleIds) {
+    if (roleIds == null || roleIds.isEmpty()) {
+      return "SELECT role_id as roleId, role_name as roleName, updated_at as 
updatedAt FROM "
+          + ROLE_TABLE_NAME
+          + " WHERE 1 = 0";

Review Comment:
   What is the meaning of `1 = 0`?



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