deniskuzZ commented on code in PR #12528:
URL: https://github.com/apache/iceberg/pull/12528#discussion_r2131824235
##########
core/src/main/java/org/apache/iceberg/PartitionsTable.java:
##########
@@ -290,27 +297,25 @@ void update(ContentFile<?> file, Snapshot snapshot) {
if (snapshot != null) {
long snapshotCommitTime = snapshot.timestampMillis() * 1000;
if (this.lastUpdatedAt == null || snapshotCommitTime >
this.lastUpdatedAt) {
+ this.specId = file.specId();
+
Review Comment:
thanks for the review, @pvary! That is required to pick the latest specId in
case or rename.
see
TestMetadataTableScansWithPartitionEvolution#testPartitionSpecRenameFields()
````
specId=0
PartitionSpec.builderFor(schema).identity("data").identity("category").build(),
````
execute partCol rename
````
specId=1
table.updateSpec().renameField("category", "category_another_name").commit();
````
assertPartitions("data=c1/category_another_name=d1",
"data=c2/category_another_name=d2");
--
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]