JingsongLi commented on code in PR #4565:
URL: https://github.com/apache/paimon/pull/4565#discussion_r1853479938


##########
paimon-core/src/main/java/org/apache/paimon/tag/Tag.java:
##########
@@ -201,4 +179,28 @@ public boolean equals(Object o) {
         return Objects.equals(tagCreateTime, that.tagCreateTime)
                 && Objects.equals(tagTimeRetained, that.tagTimeRetained);
     }
+
+    // =================== Utils for reading =========================
+
+    public static Tag fromJson(String json) {
+        return JsonSerdeUtil.fromJson(json, Tag.class);
+    }
+
+    public static Tag fromPath(FileIO fileIO, Path path) {
+        try {
+            return tryFromPath(fileIO, path);
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException(e.getMessage(), e);
+        }
+    }
+
+    public static Tag tryFromPath(FileIO fileIO, Path path) throws 
FileNotFoundException {

Review Comment:
   Tag is mutable, it is danger.



-- 
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: issues-unsubscr...@paimon.apache.org

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

Reply via email to