This is an automated email from the ASF dual-hosted git repository.

amogh-jahagirdar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/main by this push:
     new 8e8343b3d9 Core: Don't override equals() and hashCode() in V4 
DeletionVector (#17447)
8e8343b3d9 is described below

commit 8e8343b3d9f46e133f573f2d62017fde3cb4fa5a
Author: gaborkaszab <[email protected]>
AuthorDate: Mon Aug 3 17:56:10 2026 +0200

    Core: Don't override equals() and hashCode() in V4 DeletionVector (#17447)
---
 .../org/apache/iceberg/DeletionVectorStruct.java   | 21 --------
 .../apache/iceberg/TestDeletionVectorStruct.java   | 58 ----------------------
 2 files changed, 79 deletions(-)

diff --git a/core/src/main/java/org/apache/iceberg/DeletionVectorStruct.java 
b/core/src/main/java/org/apache/iceberg/DeletionVectorStruct.java
index 3f5be0756f..04d23fa33a 100644
--- a/core/src/main/java/org/apache/iceberg/DeletionVectorStruct.java
+++ b/core/src/main/java/org/apache/iceberg/DeletionVectorStruct.java
@@ -19,7 +19,6 @@
 package org.apache.iceberg;
 
 import java.io.Serializable;
-import java.util.Objects;
 import org.apache.iceberg.avro.SupportsIndexProjection;
 import org.apache.iceberg.relocated.com.google.common.base.MoreObjects;
 import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
@@ -129,26 +128,6 @@ class DeletionVectorStruct extends SupportsIndexProjection 
implements DeletionVe
     return new Builder();
   }
 
-  @Override
-  public boolean equals(Object other) {
-    if (this == other) {
-      return true;
-    } else if (!(other instanceof DeletionVectorStruct)) {
-      return false;
-    }
-
-    DeletionVectorStruct that = (DeletionVectorStruct) other;
-    return Objects.equals(location, that.location)
-        && offset == that.offset
-        && sizeInBytes == that.sizeInBytes
-        && cardinality == that.cardinality;
-  }
-
-  @Override
-  public int hashCode() {
-    return Objects.hash(location, offset, sizeInBytes, cardinality);
-  }
-
   @Override
   public String toString() {
     return MoreObjects.toStringHelper(this)
diff --git 
a/core/src/test/java/org/apache/iceberg/TestDeletionVectorStruct.java 
b/core/src/test/java/org/apache/iceberg/TestDeletionVectorStruct.java
index 88f67a7718..b20a096077 100644
--- a/core/src/test/java/org/apache/iceberg/TestDeletionVectorStruct.java
+++ b/core/src/test/java/org/apache/iceberg/TestDeletionVectorStruct.java
@@ -163,64 +163,6 @@ class TestDeletionVectorStruct {
         .hasMessage("Missing required value: cardinality");
   }
 
-  @Test
-  void dvEquality() {
-    DeletionVectorStruct dv =
-        DeletionVectorStruct.builder()
-            .location("s3://bucket/data/dv.puffin")
-            .offset(256L)
-            .sizeInBytes(128L)
-            .cardinality(42L)
-            .build();
-
-    DeletionVectorStruct sameDv =
-        DeletionVectorStruct.builder()
-            .location("s3://bucket/data/dv.puffin")
-            .offset(256L)
-            .sizeInBytes(128L)
-            .cardinality(42L)
-            .build();
-
-    DeletionVectorStruct dvWithDifferentLocation =
-        DeletionVectorStruct.builder()
-            .location("s3://bucket/data/dv2.puffin")
-            .offset(256L)
-            .sizeInBytes(128L)
-            .cardinality(42L)
-            .build();
-
-    DeletionVectorStruct dvWithDifferentOffset =
-        DeletionVectorStruct.builder()
-            .location("s3://bucket/data/dv.puffin")
-            .offset(1L)
-            .sizeInBytes(128L)
-            .cardinality(42L)
-            .build();
-
-    DeletionVectorStruct dvWithDifferentSize =
-        DeletionVectorStruct.builder()
-            .location("s3://bucket/data/dv.puffin")
-            .offset(256L)
-            .sizeInBytes(8L)
-            .cardinality(42L)
-            .build();
-
-    DeletionVectorStruct dvWithDifferentCardinality =
-        DeletionVectorStruct.builder()
-            .location("s3://bucket/data/dv.puffin")
-            .offset(256L)
-            .sizeInBytes(128L)
-            .cardinality(2L)
-            .build();
-
-    assertThat(dv).isEqualTo(dv);
-    assertThat(dv).isEqualTo(sameDv);
-    assertThat(dv).isNotEqualTo(dvWithDifferentLocation);
-    assertThat(dv).isNotEqualTo(dvWithDifferentOffset);
-    assertThat(dv).isNotEqualTo(dvWithDifferentSize);
-    assertThat(dv).isNotEqualTo(dvWithDifferentCardinality);
-  }
-
   @Test
   void builderRejectsInvalidValuesAtSetter() {
     assertThatThrownBy(() -> DeletionVectorStruct.builder().location(null))

Reply via email to