anoopj commented on code in PR #17198: URL: https://github.com/apache/iceberg/pull/17198#discussion_r3582475951
########## format/spec.md: ########## @@ -700,6 +700,10 @@ The `sequence_number` field represents the data sequence number and must never c The `file_sequence_number` field represents the sequence number of the snapshot that added the file and must also remain unchanged upon assigning at commit. The file sequence number can't be used for pruning delete files as the data within the file may have an older data sequence number. The data and file sequence numbers are inherited only if the entry status is 1 (added). If the entry status is 0 (existing) or 2 (deleted), the entry must include both sequence numbers explicitly. +#### Content file uniqueness + +Within a snapshot, each live manifest entry must be uniquely defined by `file_path` across all manifest files. A snapshot with multiple live entries for the same `file_path` has undefined behavior. Writers are not required to validate uniqueness because doing so can be expensive at commit time. Review Comment: How about stating it in terms of the file rather than the entry or field name? e.g. something like: > Within a snapshot, each content file must be referenced by at most one live entry across all manifests. Entries reference the same content file if they have the same file location, even if other field values differ. A snapshot in which more than one live entry references the same content file has undefined behavior. Writers are not required to validate uniqueness at commit time. I dropped "because doing so can be expensive at commit time" because it might not belong to the spec, but we can retain it if you prefer. -- 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]
