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/23 18:35:42 UTC

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

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



##########
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:
       What about returning a static value early rather than creating a hasher and not adding data to it?




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