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


##########
core/src/main/java/org/apache/gravitino/storage/relational/utils/POConverters.java:
##########
@@ -1720,4 +1723,50 @@ private static ModelVersionAliasRelPO 
createAliasRelPO(ModelVersionEntity entity
         .withDeletedAt(DEFAULT_DELETED_AT)
         .build();
   }
+
+  public static StatisticEntity fromStatisticPO(StatisticPO statisticPO) {
+    try {
+      return StatisticEntity.builder()
+          .withId(statisticPO.getStatisticId())
+          .withName(statisticPO.getStatisticName())
+          .withValue(
+              JsonUtils.anyFieldMapper()
+                  .readValue(statisticPO.getStatisticValue(), 
StatisticValue.class))
+          .withAuditInfo(
+              JsonUtils.anyFieldMapper().readValue(statisticPO.getAuditInfo(), 
AuditInfo.class))
+          .build();
+    } catch (JsonProcessingException je) {
+      throw new RuntimeException(je);
+    }
+  }
+
+  public static List<StatisticPO> initializeStatisticPOs(

Review Comment:
   Done.



-- 
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-unsubscr...@gravitino.apache.org

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

Reply via email to