prashantwason commented on a change in pull request #2701:
URL: https://github.com/apache/hudi/pull/2701#discussion_r663175716



##########
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieInstant.java
##########
@@ -183,25 +183,30 @@ public boolean equals(Object o) {
       return false;
     }
     HoodieInstant that = (HoodieInstant) o;
-    return state == that.state && Objects.equals(action, that.action) && 
Objects.equals(timestamp, that.timestamp);
+    return state == that.state && Objects.equals(action, that.action) && 
Objects.equals(this.instantTime.getActionStartTimestamp(), 
that.instantTime.getActionStartTimestamp());
   }
 
   public State getState() {
     return state;
   }
 
+  public InstantTime getInstantTime() {
+    return instantTime;
+  }
+
   @Override
   public int hashCode() {
-    return Objects.hash(state, action, timestamp);
+    return Objects.hash(state, action, 
this.instantTime.getActionStartTimestamp());
   }
 
   @Override
   public int compareTo(HoodieInstant o) {
-    return COMPARATOR.compare(this, o);
+    return START_INSTANT_TIME_COMPARATOR.compare(this, o);
   }
 
   @Override
   public String toString() {
-    return "[" + ((isInflight() || isRequested()) ? "==>" : "") + timestamp + 
"__" + action + "__" + state + "]";
+    return "[" + ((isInflight() || isRequested()) ? "==>" : "") + 
this.instantTime.getActionStartTimestamp() + "__" + action + "__" + state + "]";

Review comment:
       It might be useful to include the end timestamp too (in case it differs)




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