xanderbailey commented on code in PR #3236:
URL: https://github.com/apache/iceberg-rust/pull/3236#discussion_r4045406573
##########
crates/iceberg/src/spec/manifest/writer.rs:
##########
@@ -508,14 +508,22 @@ impl ManifestWriter {
}
let content = avro_writer.into_inner()?;
- let length = content.len();
let mut writer = self.writer_future.await?;
writer.write(Bytes::from(content)).await?;
- writer.close().await?;
+ let file_metadata = writer.close().await?;
+ let key_metadata = self
+ .key_metadata
+ .map(|metadata| {
+ metadata
+ .with_file_length(file_metadata.size)
+ .encode()
+ .map(|bytes| bytes.into_vec())
+ })
+ .transpose()?;
Ok(ManifestFile {
manifest_path: self.location,
- manifest_length: length as i64,
+ manifest_length: file_metadata.size.try_into()?,
Review Comment:
https://github.com/apache/iceberg-rust/blob/45925b7c0197ea03f1ab6d66829b455d5447df08/crates/iceberg/src/transaction/append.rs#L468-L469
--
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]