ulysses-you commented on code in PR #5101:
URL: https://github.com/apache/paimon/pull/5101#discussion_r1959123639


##########
paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/AbstractSparkInternalRow.java:
##########
@@ -251,11 +251,21 @@ public boolean equals(Object o) {
             return false;
         }
         AbstractSparkInternalRow that = (AbstractSparkInternalRow) o;
-        return Objects.equals(rowType, that.rowType) && Objects.equals(row, 
that.row);
+        try {
+            return Objects.equals(rowType, that.rowType) && 
Objects.equals(row, that.row);
+        } catch (Exception e) {
+            // The underlying row may not support equals or hashcode, e.g., 
`ProjectedRow`,
+            // to be safe, we fallback to super.
+            return super.equals(o);

Review Comment:
   This is mainly used to avoid exception. If we want to make behavior correct, 
how about doing a deep copy and then compare ?



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