stevenzwu commented on code in PR #18225:
URL: https://github.com/apache/iceberg/pull/18225#discussion_r4086920468


##########
core/src/main/java/org/apache/iceberg/V4ManifestReader.java:
##########
@@ -130,7 +143,16 @@ public CloseableIterator<TrackedFile> iterator() {
   private TrackedFile applyInheritance(TrackedFile file) {
     // the reader uses TrackingStruct to read tracking so this cast is safe
     TrackingStruct tracking = (TrackingStruct) file.tracking();
-    tracking.inherit(manifest.snapshotId(), manifest.sequenceNumber());
+    if (isUncommitted) {
+      // uncommitted files cannot have a sequence number or assign first row ID
+      tracking.inherit(manifest.snapshotId());
+    } else {
+      tracking.inherit(manifest.snapshotId(), manifest.sequenceNumber());
+      if (tracking.assignFirstRowId(nextRowId)) {

Review Comment:
   ah. you are right. I forgot root manifest entries have first_row_id 
materialized. the first_row_id bump logic for leaf manifest will live the root 
manifest writer.
   
   agree that root/leaf separation can be a different PR.



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