yshcz commented on code in PR #1979:
URL: https://github.com/apache/iceberg-rust/pull/1979#discussion_r2658713702
##########
crates/iceberg/src/spec/manifest/writer.rs:
##########
@@ -437,7 +437,9 @@ impl ManifestWriter {
"format-version".to_string(),
(self.metadata.format_version as u8).to_string(),
)?;
- if self.metadata.format_version == FormatVersion::V2 {
+ if self.metadata.format_version == FormatVersion::V2
+ || self.metadata.format_version == FormatVersion::V3
+ {
Review Comment:
Might be worth using a match on `self.metadata.format_version` here similar
to the pattern used in `avro_schema` above, so the compiler can catch any
unhandled versions
in the future.
```rust
match self.metadata.format_version {
FormatVersion::V1 => {}
FormatVersion::V2 | FormatVersion::V3 => {
avro_writer
.add_user_metadata("content".to_string(),
self.metadata.content.to_string())?;
}
}
```
--
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]