xanderbailey commented on code in PR #2568:
URL: https://github.com/apache/iceberg-rust/pull/2568#discussion_r3341422177


##########
crates/iceberg/src/spec/manifest/writer.rs:
##########
@@ -52,14 +53,16 @@ pub struct ManifestWriterBuilder {
 impl ManifestWriterBuilder {
     /// Create a new builder.
     pub fn new(
-        output: OutputFile,
+        writer: Box<dyn FileWrite>,

Review Comment:
   Not sure I quite follow sorry, is that to say we keep this constructor and 
store something like:
   ```
   writer: Pin<Box<dyn Future<Output = Result<Box<dyn FileWrite>>> + Send>>
   ``` 
   in the struct and have a new constructor:
   
   ```
       pub fn new_from_encrypted(
           encrypted_output: EncryptedOutputFile,
           snapshot_id: Option<i64>,
           key_metadata: Option<Vec<u8>>,
           schema: SchemaRef,
           partition_spec: PartitionSpec,
       ) -> Self {
           let location = encrypted_output.location().to_owned();
           Self {
               writer_future: Box::pin(async move { 
encrypted_output.writer().await }),
               location,
               snapshot_id,
               key_metadata,
               schema,
               partition_spec,
           }
       }
   ```?



-- 
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]

Reply via email to