You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/01/24 02:28:31 UTC

[GitHub] [iceberg] coolderli commented on a change in pull request #3945: Core: Use changed partition to validate file confilct

coolderli commented on a change in pull request #3945:
URL: https://github.com/apache/iceberg/pull/3945#discussion_r790378026



##########
File path: core/src/main/java/org/apache/iceberg/PartitionData.java
##########
@@ -191,8 +191,10 @@ public boolean equals(Object o) {
   @Override
   public int hashCode() {
     Hasher hasher = Hashing.goodFastHash(32).newHasher();
-    Stream.of(data).map(Objects::hashCode).forEach(hasher::putInt);
-    partitionType.fields().stream().map(Objects::hashCode).forEach(hasher::putInt);
+    if (size > 0) {

Review comment:
       Sound good, but I don't know which static value I should choose to prevent collision with others. I use `Hashing.goodFastHash(32).newHasher().hash().hashCode()` to calculate and the result is 517856167, I don't know if it is suitable. Can you give me some advice?




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