moomindani opened a new pull request, #3624: URL: https://github.com/apache/iceberg-python/pull/3624
Closes #3620 (part of #1551) # Rationale for this change Adds the writer side for V3 manifests and manifest lists (the V3 read schemas already exist): - **`ManifestWriterV3`**: writes manifest entries using the V3 record layout so the V3-only data file fields (`first_row_id`, `referenced_data_file`, `content_offset`, `content_size_in_bytes`) are actually written — with the default V2 record layout they would silently serialize as null. Data files bound to the V2 layout are rebound to V3. - **`ManifestListWriterV3`**: implements the spec's [First Row ID Assignment](https://iceberg.apache.org/spec/#first-row-id-assignment): existing `first_row_id` values are preserved, delete manifests are never assigned one, and unassigned data manifests get a running value starting at the snapshot's `first-row-id`, advanced by `existing_rows_count + added_rows_count`. The writer exposes `next_row_id` so the commit path can update the table's `next-row-id` (wiring is #3621). Metadata carries `first-row-id` and `format-version: 3`, matching the Java `ManifestListWriter.V3Writer`. This is writer-level only: nothing produces V3 snapshots yet (that's #3621, with table-level enablement in #3551 / #3622). ## Are these changes tested? Yes, five new tests: a V3 manifest round-trip verifying the V3 data file fields are written (including the V2-to-V3 rebinding path), first-row-id assignment across unassigned/preserved/delete/second-unassigned manifests (asserting `[1000, 77, null, 1125]` and `next_row_id == 1130`), and validation that `first_row_id` is required. All fail without the implementation and pass with it. No new failures in `tests/table`, `tests/catalog`, `tests/avro`. ## Are there any user-facing changes? No user-facing behavior changes; this adds writer capabilities used by upcoming V3 write support. This pull request and its description were written by Claude Fable 5. -- 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]
