rdblue commented on code in PR #5913:
URL: https://github.com/apache/iceberg/pull/5913#discussion_r989560071
##########
core/src/main/java/org/apache/iceberg/ManifestEntry.java:
##########
@@ -70,14 +75,47 @@ static Schema wrapFileSchema(StructType fileType) {
*/
void setSnapshotId(long snapshotId);
- /** Returns the sequence number of the snapshot in which the file was added
to the table. */
+ /**
+ * Returns the data sequence number of the file.
+ *
+ * <p>Independently of the entry status, this method represents the sequence
number to which the
+ * file should apply. Note the data sequence number may differ from the
sequence number of the
+ * snapshot in which the underlying file was added. New snapshots can add
files that belong to
+ * older sequence numbers (e.g. compaction). The data sequence number also
does not change when
+ * the file is marked as deleted.
+ *
+ * <p>This method can return null if the data sequence number is not known.
This may happen while
+ * reading a V2 manifest that did not persist the data sequence number for
manifest entries with
+ * status DELETED (older Iceberg versions).
+ */
+ Long dataSequenceNumber();
+
+ /**
+ * Sets the data sequence number for this manifest entry.
+ *
+ * @param dataSequenceNumber a data sequence number
+ */
+ void setDataSequenceNumber(long dataSequenceNumber);
+
+ /**
+ * Returns the data sequence number of the file if the entry status is ADDED
or EXISTING.
+ * Otherwise, returns the sequence number of the snapshot in which the file
was removed.
+ *
+ * <p>Note that usage of this method should be avoided as it behaves
inconsistently for different
+ * entry statutes. Use {@link #dataSequenceNumber()} instead.
+ *
+ * @deprecated since 1.0.0, will be removed in 1.1.0; use {@link
#dataSequenceNumber()} instead.
+ */
+ @Deprecated
Review Comment:
I'd prefer removing it.
--
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]