You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "Jackeyzhe (via GitHub)" <gi...@apache.org> on 2025/06/09 13:44:56 UTC

Re: [PR] [#7360] feat(policy): support CURD ops for policy in backend storage (part-2) [gravitino]

Jackeyzhe commented on code in PR #7361:
URL: https://github.com/apache/gravitino/pull/7361#discussion_r2135753258


##########
core/src/main/java/org/apache/gravitino/storage/relational/utils/POConverters.java:
##########
@@ -1305,6 +1385,74 @@ public static TagMetadataObjectRelPO initializeTagMetadataObjectRelPOWithVersion
     }
   }
 
+  public static PolicyEntity fromPolicyPO(PolicyPO policyPO, Namespace namespace) {
+    try {
+      return PolicyEntity.builder()
+          .withId(policyPO.getPolicyId())
+          .withName(policyPO.getPolicyName())
+          .withNamespace(namespace)
+          .withType(policyPO.getPolicyType())
+          .withComment(policyPO.getPolicyVersionPO().getPolicyComment())

Review Comment:
   Do you think it should check if the policyVersion is null here?



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org