gmhelmold opened a new pull request, #2825: URL: https://github.com/apache/iceberg-rust/pull/2825
## Which issue does this PR close? Part of #823 (metadata tables tracking issue). Follows the pattern of the existing `snapshots` and `manifests` tables. ## What changes are included in this PR? Adds the `history` metadata table, mirroring Java's `HistoryTable`: - `HistoryTable` in `iceberg::inspect` with the Java schema exactly (field ids 1–4: `made_current_at` timestamptz, `snapshot_id`, nullable `parent_id`, `is_current_ancestor`). - One row per snapshot-log entry. `is_current_ancestor` is computed by walking the current snapshot's parent chain — rolled-back snapshots stay visible in the log but are flagged `false`, matching `SnapshotUtil.currentAncestorIds` semantics. - `parent_id` is null when the entry's snapshot has been expired, matching Java's null guard. - The ancestor walk carries a cycle guard, so corrupt metadata with a parent cycle cannot hang the scan. - Registered in `MetadataTableType` and the DataFusion provider (`table$history`). ## Are these changes tested? - `test_history_table_with_rolled_back_snapshot`: a table rolled back from S2 and re-committed as S3 (parent S1) — asserts S2 remains in history with `is_current_ancestor = false` while S1/S3 stay `true`. This lineage divergence is what distinguishes `history` from `snapshots`. - The same test also covers expired-snapshot log entries (null `parent_id`, `false` ancestor flag) and a snapshot appearing twice in the log (one row per entry). - `test_history_table`: schema + full-row assertions over the shared fixture. - DataFusion table listing and `SHOW TABLES` sqllogictest updated; `public-api.txt` regenerated. -- 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]
