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