amogh-jahagirdar commented on code in PR #11764: URL: https://github.com/apache/iceberg/pull/11764#discussion_r1887086788
########## api/src/main/java/org/apache/iceberg/types/Types.java: ########## @@ -723,6 +723,9 @@ public int hashCode() { public static class StructType extends NestedType { private static final Joiner FIELD_SEP = Joiner.on(", "); + private static final int NO_HASHCODE = Integer.MIN_VALUE; Review Comment: I was originally going to suggest we follow the same pattern we do in `CharSequenceWrapper` where we have two fields, the hashCode and a boolean `hashIsZero` flag. This way in case the hashCode is actually zero we don't recompute it. In the current implementation, we would recompute the hashCode if it's actually Integer.MIN_VALUE but arguably not worth the complexity to handle that for this case. -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org