Skip to content

Commit 78e103a

Browse files
committed
Spec: Fix row lineage sequence number inheritance
Update the row lineage spec to say that inherited _last_updated_sequence_number values come from a data file's file_sequence_number, not its data_sequence_number. This matches the Java scan constant implementation and the field's meaning as the sequence number of the commit that last updated the row. Using data_sequence_number would diverge for rewrites where the data sequence can differ from the snapshot that added the file. Generated-by: OpenAI Codex
1 parent da8ff44 commit 78e103a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

format/spec.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ When a row is added or modified, the `_last_updated_sequence_number` field is se
472472

473473
A data file with only new rows for the table may omit the `_last_updated_sequence_number` and `_row_id`. If the columns are missing, readers should treat both columns as if they exist and are set to null for all rows.
474474

475-
On read, if `_last_updated_sequence_number` is `null` it is assigned the `sequence_number` of the data file's manifest entry. The data sequence number of a data file is documented in [Sequence Number Inheritance](#sequence-number-inheritance).
475+
On read, if `_last_updated_sequence_number` is `null` it is assigned the `file_sequence_number` of the data file's manifest entry. The file sequence number of a data file is documented in [Sequence Number Inheritance](#sequence-number-inheritance).
476476

477477
When `null`, a row's `_row_id` field is assigned to the `first_row_id` from its containing data file plus the row position in that data file (`_pos`). A data file's `first_row_id` field is assigned using inheritance and is documented in [First Row ID Inheritance](#first-row-id-inheritance). A manifest's `first_row_id` is assigned when writing the manifest list for a snapshot and is documented in [First Row ID Assignment](#first-row-id-assignment). A snapshot's `first-row-id` is set to the table's `next-row-id` and is documented in [Snapshot Row IDs](#snapshot-row-ids).
478478

@@ -1954,7 +1954,7 @@ Row lineage changes:
19541954
* When writing an existing data file into a new manifest, its `first_row_id` must be written into the manifest
19551955
* When a data file has a non-null `first_row_id`, readers must:
19561956
* Replace any null or missing `_row_id` with the data file's `first_row_id` plus the row's `_pos`
1957-
* Replace any null or missing `_last_updated_sequence_number` to the data file's `data_sequence_number`
1957+
* Replace any null or missing `_last_updated_sequence_number` with the data file's `file_sequence_number`
19581958
* Read any non-null `_row_id` or `_last_updated_sequence_number` without modification
19591959
* When a data file has a null `first_row_id`, readers must produce null for `_row_id` and `_last_updated_sequence_number`
19601960
* When writing an existing row into a new data file, writers must write `_row_id` and `_last_updated_sequence_number` if they are non-null

0 commit comments

Comments
 (0)