zakariya-s opened a new pull request, #2776: URL: https://github.com/apache/iceberg-rust/pull/2776
## Which issue does this PR close? - Closes #2775. ## What changes are included in this PR? Metadata files were always written under `<table-location>/metadata`, ignoring the `write.metadata.path` table property. Iceberg Java honors it (via `BaseMetastoreTableOperations.metadataFileLocation`); this brings iceberg-rust in line and mirrors the existing `write.data.path` handling for data files. - Add `TableMetadata::metadata_location_root()`, returning `write.metadata.path` (trailing slash trimmed) when set, otherwise `<location>/metadata`. - Use it in `SnapshotProducer` for the manifest and manifest-list paths, and in `MetadataLocation` for the table metadata JSON. - `MetadataLocation` now stores the resolved metadata directory rather than the table location. On commit, the directory is re-derived from the metadata being committed (the version is still parsed from the previous file name), matching Iceberg Java. As a result `MetadataLocation::from_str` no longer requires the file to live under a `/metadata` directory (a custom `write.metadata.path` does not have to); file-name validation is unchanged. ## Are these changes tested? Unit tests: - `TableMetadata::metadata_location_root()`: default, configured `write.metadata.path`, and trailing-slash trimming. - `MetadataLocation`: create (`new_with_metadata`) and commit (`with_new_metadata`) honor `write.metadata.path`; `from_str` round-trip cases updated for arbitrary metadata dirs. - A `fast_append` transaction test asserting the manifest list and manifests are written under a configured `write.metadata.path`. - Updated `catalog::tests::test_table_commit` to reflect the new metadata file following the updated table location. -- 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]
