deniskuzZ commented on code in PR #12528: URL: https://github.com/apache/iceberg/pull/12528#discussion_r1996252807
########## 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: Updated the PR to compare the number of projected fields. The issue is that 2 projections with null and missing field values are considered equals. That leads to incorrect PartitionMap construction: Below PartitionProjections are equal, so in PartitionMap we'll have just 1 random entry: ```` "ice_orc(company_id=null)" "ice_orc(company_id=null/dept_id=null)" "ice_orc(company_id=null/dept_id=null/team_id=null)" ```` -- 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