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