You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/10/23 18:24:56 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #6002: Core: Add file seq number to ManifestEntry

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


##########
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:
   We already use `dataSequenceNumber` / `sequenceNumber` in scan planning. We just renamed how it was referenced in core recently. If we choose to expose these on `ContentFile` that's fine, but something we should do in a separate 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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org