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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to