tustvold commented on code in PR #5753:
URL: https://github.com/apache/arrow-rs/pull/5753#discussion_r1597461850
##########
parquet/src/arrow/async_writer/mod.rs:
##########
@@ -188,12 +234,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::copy_from_slice(buffer))
Review Comment:
Could we avoid this copy, perhaps by taking the buffer and replacing it with
a freshly allocated one?
--
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]