xudong963 commented on issue #1269:
URL: https://github.com/apache/arrow-rs/issues/1269#issuecomment-1030858823


   I felt the need to provide these new APIs and structs.
   
   ```rust
   pub struct AsyncArrowWriter<W: W: AsyncWrite + Unpin + Send> {
       writer: FileStream<W>,
       ...
   }
   
   pub struct FileStream<W: AsyncWriter + Send + Unpined> {
       writer: W
   }
   
   impl <...> FileStream {
       pub async fn write(&mut self, ...) -> Result<> {
           // 1. firstly, write header
           write_header().await?;
           // 2. secondly, write rowgroups
           write_row_groups().await?;
           // 3. thirdly, write metadata
           write_metadata().await?;
       }
   }
   ```
   
   I noticed that we have a **buffer** optimization in the sync write part. I'm 
not sure if we need to keep the buffer in the async write part.


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


Reply via email to