alamb commented on code in PR #9357:
URL: https://github.com/apache/arrow-rs/pull/9357#discussion_r2790456602
##########
parquet/src/arrow/arrow_writer/mod.rs:
##########
@@ -331,18 +341,58 @@ impl<W: Write + Send> ArrowWriter<W> {
),
};
- // If would exceed max_row_group_size, split batch
- if in_progress.buffered_rows + batch.num_rows() >
self.max_row_group_size {
- let to_write = self.max_row_group_size - in_progress.buffered_rows;
- let a = batch.slice(0, to_write);
- let b = batch.slice(to_write, batch.num_rows() - to_write);
- self.write(&a)?;
- return self.write(&b);
+ if let Some(max_rows) = self.max_row_group_row_count {
+ if in_progress.buffered_rows + batch.num_rows() > max_rows {
+ let to_write = max_rows - in_progress.buffered_rows;
+ let a = batch.slice(0, to_write);
+ let b = batch.slice(to_write, batch.num_rows() - to_write);
+ self.write(&a)?;
+ return self.write(&b);
Review Comment:
I filed a ticket to track
- https://github.com/apache/arrow-rs/issues/9386
Given the prior code path for `max_row_group_size` also uses recursion I
don't think this is a new bug introduced by this PR (though the max bytes path
is now also susceptible to the same issue
--
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]