tustvold commented on code in PR #5485:
URL: https://github.com/apache/arrow-rs/pull/5485#discussion_r1517088149
##########
parquet/src/arrow/async_writer/mod.rs:
##########
@@ -96,50 +91,30 @@ pub struct AsyncArrowWriter<W> {
/// Async writer provided by caller
async_writer: W,
-
- /// Trigger forced flushing once buffer size reaches this value
- buffer_size: usize,
}
impl<W: AsyncWrite + Unpin + Send> AsyncArrowWriter<W> {
- /// Try to create a new Async Arrow Writer.
- ///
- /// `buffer_size` determines the minimum number of bytes to buffer before
flushing
- /// to the underlying [`AsyncWrite`]. However, the nature of writing
parquet may
- /// force buffering of data in excess of this within the underlying
[`ArrowWriter`].
- /// See the documentation on [`ArrowWriter`] for more details
+ /// Try to create a new Async Arrow Writer
pub fn try_new(
writer: W,
arrow_schema: SchemaRef,
- buffer_size: usize,
props: Option<WriterProperties>,
) -> Result<Self> {
let options =
ArrowWriterOptions::new().with_properties(props.unwrap_or_default());
- Self::try_new_with_options(writer, arrow_schema, buffer_size, options)
+ Self::try_new_with_options(writer, arrow_schema, options)
}
- /// Try to create a new Async Arrow Writer with [`ArrowWriterOptions`].
- ///
- /// `buffer_size` determines the minimum number of bytes to buffer before
flushing
- /// to the underlying [`AsyncWrite`]. However, the nature of writing
parquet may
- /// force buffering of data in excess of this within the underlying
[`ArrowWriter`].
- /// See the documentation on [`ArrowWriter`] for more details
+ /// Try to create a new Async Arrow Writer with [`ArrowWriterOptions`]
pub fn try_new_with_options(
writer: W,
arrow_schema: SchemaRef,
- buffer_size: usize,
Review Comment:
I debated keeping this around as a `capacity` argument, but decided this was
likely a premature optimisation. We can always add a `with_capacity` function
down the line if necessary
--
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]