vigneshsiva11 opened a new pull request, #2037:
URL: https://github.com/apache/iceberg-rust/pull/2037
## Which issue does this PR close?
Closes #2028
## What changes are included in this PR?
This PR refactors `TableMetadata` to use the typed `TableProperties` struct
instead of a raw `HashMap<String, String>`, addressing issue #2028. This
improvement enhances type safety and reduces repeated allocations by returning
references to structured data rather than reconstructing property maps on every
call.
### Key Modifications:
- **TableMetadata**
- Updated the `properties` field type
- Simplified the `table_properties()` getter to return a reference to the
struct
- **TableProperties**
- Added `Default`, `Clone`, `PartialEq`, and `Eq` trait implementations
- Added an `other: HashMap<String, String>` field to maintain
compatibility with custom or non-explicitly mapped properties
- Implemented a `new()` constructor to facilitate conversion from raw maps
- **TableMetadataBuilder**
- Updated the builder logic to initialize `TableMetadata` using the new
`TableProperties` type
- **Documentation**
- Added required doc comments to new fields and methods to satisfy the
project's strict linting rules (`missing_docs`)
## Are these changes tested?
Yes.
- Verified using `cargo check -p iceberg` with no errors or lint warnings
- Code formatted using `cargo fmt --all`
The logic ensures existing property-based workflows remain functional
through the internal `other` property map delegation.
--
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]