deniskuzZ commented on code in PR #12528: URL: https://github.com/apache/iceberg/pull/12528#discussion_r1996398329
########## api/src/main/java/org/apache/iceberg/types/Comparators.java: ########## @@ -108,6 +109,15 @@ public int compare(StructLike o1, StructLike o2) { return 0; } + if (o1 instanceof StructProjection && o2 instanceof StructProjection) { Review Comment: an alternative solution could be replacing `NULL` values in a struct with `__HIVE_DEFAULT_PARTITION__` ```` StructLike partitionKey = newPartitionKey(file.partition(), "__HIVE_DEFAULT_PARTITION__"); StructLike partition = PartitionUtil.coercePartition( partitionType, table.specs().get(file.specId()), file.partition()); partitions.get(partition).update(file, snapshot); ```` however, I don't think it's a better approach since this hack should be applied in multiple places and could potentially lead to new issues. I believe that PartitionProjections with NON_EXISTING and NULL fields should not be considered equal. If all tests pass under the assumption that they should be, this assumption may not be accurate. -- 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