ajantha-bhat commented on code in PR #11216:
URL: https://github.com/apache/iceberg/pull/11216#discussion_r1818885035


##########
core/src/main/java/org/apache/iceberg/PartitionStats.java:
##########
@@ -249,4 +250,45 @@ public <T> void set(int pos, T value) {
         throw new UnsupportedOperationException("Unknown position: " + pos);
     }
   }
+
+  @Override
+  @SuppressWarnings("checkstyle:CyclomaticComplexity")
+  public boolean equals(Object other) {
+    if (this == other) {
+      return true;
+    } else if (!(other instanceof PartitionStats)) {
+      return false;
+    }
+
+    PartitionStats that = (PartitionStats) other;
+    return Objects.equals(partition, that.partition)
+        && specId == that.specId
+        && dataRecordCount == that.dataRecordCount
+        && dataFileCount == that.dataFileCount
+        && totalDataFileSizeInBytes == that.totalDataFileSizeInBytes
+        && positionDeleteRecordCount == that.positionDeleteRecordCount
+        && positionDeleteFileCount == that.positionDeleteFileCount
+        && equalityDeleteRecordCount == that.equalityDeleteRecordCount
+        && equalityDeleteFileCount == that.equalityDeleteFileCount
+        && totalRecordCount == that.totalRecordCount
+        && Objects.equals(lastUpdatedAt, that.lastUpdatedAt)
+        && Objects.equals(lastUpdatedSnapshotId, that.lastUpdatedSnapshotId);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(
+        partition,

Review Comment:
   Replied 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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to