aokolnychyi commented on a change in pull request #2362:
URL: https://github.com/apache/iceberg/pull/2362#discussion_r603776797



##########
File path: api/src/main/java/org/apache/iceberg/types/Type.java
##########
@@ -111,6 +112,23 @@ public PrimitiveType asPrimitiveType() {
     Object writeReplace() throws ObjectStreamException {
       return new PrimitiveHolder(toString());
     }
+
+    @Override
+    public int hashCode() {
+      return Objects.hashCode(typeId());
+    }
+
+    @Override
+    public boolean equals(Object other) {

Review comment:
       Need more eyes on this. The way we currently compare structs breaks 
`Schema` and `PartitionSpec` Kryo  serialization. We rely on a proxy in 
`writeReplace` but Kryo ignores that.
   
   If we decide to go this way, I can submit this in a separate PR if we want 
to handle it separately.




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

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