ahmedabu98 commented on code in PR #33554:
URL: https://github.com/apache/beam/pull/33554#discussion_r1913413017


##########
sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/SerializableDataFile.java:
##########
@@ -199,4 +203,53 @@ DataFile createDataFile(Map<Integer, PartitionSpec> 
partitionSpecs) {
     }
     return output;
   }
+
+  @Override
+  @SuppressWarnings("EqualsHashCode")
+  public final boolean equals(@Nullable Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    SerializableDataFile that = (SerializableDataFile) o;
+    return getPath().equals(that.getPath())

Review Comment:
   The generated AutoValue equals method does a naive Map::equals operation, so 
it just checks reference equality for the byte arrays instead of the contents. 
   
   > Is there a way to combine any auto-generated equals with just the slight 
changes you intend?
   
   I'm not sure, is there a way to do this?



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