findepi commented on code in PR #5157:
URL: https://github.com/apache/iceberg/pull/5157#discussion_r909680581
##########
core/src/main/java/org/apache/iceberg/util/StructLikeWrapper.java:
##########
@@ -65,6 +67,10 @@ public boolean equals(Object other) {
StructLikeWrapper that = (StructLikeWrapper) other;
+ if (!type.equals(that.type)) {
Review Comment:
You can do this just before `return comparator.compare(this.struct, that`
if all you want is to "Prevent equals from throwing an exception"
however, making equals compare by type too looks like a good change as well.
this, however, should be called out in the commit message.
--
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]