turboFei commented on code in PR #4029:
URL: https://github.com/apache/amoro/pull/4029#discussion_r2651944864


##########
amoro-ams/src/test/java/org/apache/amoro/server/optimizing/flow/view/KeyedTableDataView.java:
##########
@@ -268,8 +269,16 @@ private boolean equRecord(Record r1, Record r2) {
         return true;
       } else if (o1 == null || o2 == null) {
         return false;
-      } else if (o1 instanceof OffsetDateTime) {
-        equals = ((OffsetDateTime) o1).isEqual((OffsetDateTime) o2);
+      } else if (o1 instanceof OffsetDateTime || o2 instanceof OffsetDateTime) 
{
+        if (o1 instanceof OffsetDateTime && o2 instanceof OffsetDateTime) {
+          equals = ((OffsetDateTime) o1).isEqual((OffsetDateTime) o2);
+        } else if (o1 instanceof Long) {
+          equals = (Long) o1 == 
DateTimeUtil.microsFromTimestamptz((OffsetDateTime) o2);
+        } else if (o1 instanceof Long) {
+          equals = DateTimeUtil.microsFromTimestamptz((OffsetDateTime) o1) == 
(Long) o2;
+        } else {
+          equals = false;
+        }

Review Comment:
   
   See: 
   https://github.com/apache/amoro/pull/3859#issuecomment-3475018153
   https://github.com/apache/amoro/pull/3859#issuecomment-3479349541
   



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