xxubai commented on code in PR #3735:
URL: https://github.com/apache/amoro/pull/3735#discussion_r2284488599


##########
amoro-format-iceberg/src/main/java/org/apache/amoro/formats/mixed/MixedSnapshot.java:
##########
@@ -42,10 +42,15 @@ public long watermark() {
 
   @Override
   public long commitTime() {
-    Long changCommit =
-        
Optional.ofNullable(changeSnapshot).map(Snapshot::timestampMillis).orElse(-1L);
-    Long baseCommit = 
Optional.ofNullable(baseSnapshot).map(Snapshot::timestampMillis).orElse(-1L);
-    return Longs.max(changCommit, baseCommit);
+    return Longs.max(getChangeCommit(), getBaseCommit());
+  }
+
+  public long getChangeCommit() {

Review Comment:
   Why is this function declared as public?
   
   If this method is only meant for internal usage, consider using private or 
protected to better encapsulate the implementation details.



##########
amoro-format-iceberg/src/main/java/org/apache/amoro/formats/mixed/MixedSnapshot.java:
##########
@@ -42,10 +42,15 @@ public long watermark() {
 
   @Override
   public long commitTime() {
-    Long changCommit =
-        
Optional.ofNullable(changeSnapshot).map(Snapshot::timestampMillis).orElse(-1L);
-    Long baseCommit = 
Optional.ofNullable(baseSnapshot).map(Snapshot::timestampMillis).orElse(-1L);
-    return Longs.max(changCommit, baseCommit);
+    return Longs.max(getChangeCommit(), getBaseCommit());
+  }
+
+  public long getChangeCommit() {
+    return 
Optional.ofNullable(changeSnapshot).map(Snapshot::timestampMillis).orElse(-1L);
+  }
+
+  public long getBaseCommit() {

Review Comment:
   Same above



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