flyrain commented on code in PR #6002:
URL: https://github.com/apache/iceberg/pull/6002#discussion_r1006141799


##########
core/src/main/java/org/apache/iceberg/ManifestEntry.java:
##########
@@ -118,6 +124,27 @@ default boolean isLive() {
   @Deprecated
   void setSequenceNumber(long sequenceNumber);
 
+  /**
+   * Returns the file sequence number.
+   *
+   * <p>The file sequence number represents the sequence number of the 
snapshot in which the
+   * underlying file was added. The file sequence number is always assigned at 
commit and cannot be
+   * provided explicitly, unlike the data sequence number. The file sequence 
number does not change
+   * upon assigning and must be preserved in existing and deleted entries.
+   *
+   * <p>This method can return null if the file sequence number is unknown. 
This may happen while
+   * reading a v2 manifest that did not persist the file sequence number for 
manifest entries with
+   * status EXISTING or DELETED (older Iceberg versions).
+   */
+  Long fileSequenceNumber();

Review Comment:
   IIUC, assuming df1 and df2 have data sequence number 1, once they are 
compacted to one data file df3. df3's data sequence number will be 1(the old 
one), and file sequence number is gong to be larger than 1, like 2 or 3. Is 
that correct? 
   
   How do we assign the data data sequence number, if df1 and df2 has different 
data sequence numbers? 
   ```
   df1 data seq no.: 1
   df2 data seq no.: 2
   compact df1 and df2 to df3
   df3 data seq no.?
   ```



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