You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "gaborkaszab (via GitHub)" <gi...@apache.org> on 2026/07/31 10:51:07 UTC

[PR] Core: Don't override equals() and hashCode() in V4 DeletionVector [iceberg]

gaborkaszab opened a new pull request, #17447:
URL: https://github.com/apache/iceberg/pull/17447

   (no comment)


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [PR] Core: Don't override equals() and hashCode() in V4 DeletionVector [iceberg]

Posted by "nssalian (via GitHub)" <gi...@apache.org>.
nssalian commented on PR #17447:
URL: https://github.com/apache/iceberg/pull/17447#issuecomment-5161237476

   @gaborkaszab the Rationale for this change isn't clear. Please add more details and context since reviewers here might not be aware. Happy to take a look once the reasoning is fleshed out.


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [PR] Core: Don't override equals() and hashCode() in V4 DeletionVector [iceberg]

Posted by "uros-b (via GitHub)" <gi...@apache.org>.
uros-b commented on code in PR #17447:
URL: https://github.com/apache/iceberg/pull/17447#discussion_r3700439503


##########
core/src/main/java/org/apache/iceberg/DeletionVectorStruct.java:
##########
@@ -129,26 +128,6 @@ static Builder builder() {
     return new Builder();
   }
 
-  @Override
-  public boolean equals(Object other) {

Review Comment:
   No comment documents the intended equality contract after this change. Equality is now identity-based, and the safety of that choice rests on the invariant that no caller puts DeletionVectorStruct in a Set/Map key or calls .equals() for value comparison. As key_metadata (#17438) and further V4 fields land, a future reader writing dedup/caching code could reasonably assume value equality is in place. A single class-level sentence; e.g. "Equality and hash code are identity-based; DeletionVectorStruct is a projection-backed view, not a value type" would protect this invariant. This is the same documentation gap present in none of the sibling structs (TrackedFileStruct etc.), so adding it here sets a useful precedent for the whole V4 family.



-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [PR] Core: Don't override equals() and hashCode() in V4 DeletionVector [iceberg]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on PR #17447:
URL: https://github.com/apache/iceberg/pull/17447#issuecomment-5168540610

   thanks for the context! ❤️ 


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [PR] Core: Don't override equals() and hashCode() in V4 DeletionVector [iceberg]

Posted by "amogh-jahagirdar (via GitHub)" <gi...@apache.org>.
amogh-jahagirdar merged PR #17447:
URL: https://github.com/apache/iceberg/pull/17447


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [PR] Core: Don't override equals() and hashCode() in V4 DeletionVector [iceberg]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on PR #17447:
URL: https://github.com/apache/iceberg/pull/17447#issuecomment-5152359579

   im curious, what is the reasoning to remove these? It seems useful. Would it be a surprise later on when comparing `DeletionVector`?
   
   I see it was added originally in https://github.com/apache/iceberg/commit/7c13104c8c20323c895aeb33fe5ca1f3b127889f#diff-44ec3b66acad90f4f873b3786f55feb62bb03287626b41bd4622c11d5ca9963fR132-R150


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [PR] Core: Don't override equals() and hashCode() in V4 DeletionVector [iceberg]

Posted by "gaborkaszab (via GitHub)" <gi...@apache.org>.
gaborkaszab commented on PR #17447:
URL: https://github.com/apache/iceberg/pull/17447#issuecomment-5142133647

   cc @anoopj @stevenzwu @rdblue 


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [PR] Core: Don't override equals() and hashCode() in V4 DeletionVector [iceberg]

Posted by "gaborkaszab (via GitHub)" <gi...@apache.org>.
gaborkaszab commented on PR #17447:
URL: https://github.com/apache/iceberg/pull/17447#issuecomment-5163494439

   Thanks for looking, @anoopj , @kevinjqliu , @uros-b , @nssalian !
   The reason removing them is that they shouldn't have been added. The agreement is that we don't override them for V4 metadata structs. I added a PR description with more explanation and a link to a previous comment.


-- 
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-unsubscribe@iceberg.apache.org

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


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