You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/06/29 14:05:42 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #5157: Prevent StructLikeWrapper#equals from throwing an exception

rdblue commented on code in PR #5157:
URL: https://github.com/apache/iceberg/pull/5157#discussion_r909679741


##########
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:
   This will check nested field docs. Is that the intended behavior? I think you want something more like `sameType`, possibly also ignoring nullability.
   
   I should also note that I'm not sure that this is a good idea. `StructLikeWrapper` is not intended for comparing two arbitrary structs.



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org