jerryshao commented on code in PR #11036:
URL: https://github.com/apache/gravitino/pull/11036#discussion_r3231629679
##########
core/src/main/java/org/apache/gravitino/storage/relational/mapper/provider/base/OwnerMetaBaseSQLProvider.java:
##########
@@ -124,6 +125,35 @@ public String insertOwnerRel(@Param("ownerRelPO")
OwnerRelPO ownerRelPO) {
+ ")";
}
+ public String batchInsertOwnerRels(@Param("ownerRelPOs") List<OwnerRelPO>
ownerRelPOs) {
+ return "<script>"
+ + "INSERT INTO "
+ + OWNER_TABLE_NAME
+ + " (metalake_id, metadata_object_id, metadata_object_type, owner_id,
owner_type,"
+ + " audit_info, current_version, last_version, deleted_at, updated_at)
VALUES "
+ + "<foreach collection='ownerRelPOs' item='po' separator=','>"
+ + "(#{po.metalakeId}, #{po.metadataObjectId},
#{po.metadataObjectType},"
+ + " #{po.ownerId}, #{po.ownerType}, #{po.auditInfo},"
+ + " #{po.currentVersion}, #{po.lastVersion}, #{po.deletedAt},
#{po.updatedAt})"
+ + "</foreach>"
+ + "</script>";
+ }
+
+ public String batchSoftDeleteOwnerRelByMetadataObjects(
+ @Param("deletions") List<OwnerRelForDeletion> deletions) {
+ return "<script>"
+ + "UPDATE "
+ + OWNER_TABLE_NAME
+ + " SET deleted_at = (UNIX_TIMESTAMP() * 1000.0)"
Review Comment:
test comment - delete me
--
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]