szlta commented on code in PR #4516:
URL: https://github.com/apache/iceberg/pull/4516#discussion_r847341764


##########
core/src/main/java/org/apache/iceberg/PartitionsTable.java:
##########
@@ -164,17 +165,20 @@ Partition get(StructLike key) {
   }
 
   static class Partition {
+    private int specId;
     private final StructLike key;
     private long recordCount;
     private int fileCount;
 
     Partition(StructLike key) {
+      this.specId = 0;

Review Comment:
   I believe you meant "different spec id but **same** key"?
   Normally if you remove a field from partition spec and then re-add it, you 
will end up with a former spec and Iceberg will not create a new spec, just to 
point to the older one. In some cases though, if you re-add the column along 
with some other columns (forming the new spec together), then you could end up 
with the problem described here: 
https://github.com/apache/iceberg/pull/3411#discussion_r823151850. That's 
something we have to solve too, but in another PR, as the scope of that 
actually covers other metadata tables too that use Partitioning.partitionType()



-- 
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]

Reply via email to