Xuanwo commented on code in PR #5753:
URL: https://github.com/apache/arrow-rs/pull/5753#discussion_r1597429609
##########
parquet/src/arrow/async_writer/mod.rs:
##########
@@ -188,12 +232,7 @@ impl<W: AsyncWrite + Unpin + Send> AsyncArrowWriter<W> {
let buffer = self.sync_writer.inner_mut();
self.async_writer
- .write_all(buffer.as_slice())
- .await
- .map_err(|e| ParquetError::External(Box::new(e)))?;
-
- self.async_writer
- .flush()
+ .write(Bytes::from(buffer))
Review Comment:
Maybe we can use `BytesMut` here so we can reclaim the memory after all
reference to `Bytes` has been dropped?
---
I'm willing to submit a PR for this.
--
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]