mapleFU commented on code in PR #39211:
URL: https://github.com/apache/arrow/pull/39211#discussion_r1425339900
##########
cpp/src/parquet/arrow/writer.cc:
##########
@@ -462,7 +462,8 @@ class FileWriterImpl : public FileWriter {
offset += batch_size;
// Flush current row group if it is full.
- if (row_group_writer_->num_rows() >= max_row_group_length) {
+ if (row_group_writer_->num_rows() >= max_row_group_length &&
+ offset < batch.num_rows()) {
Review Comment:
Hmmm `NewBufferedRowGroup()` here is as "if we have more rows needs to
write, we need to switch a buffered-writer", and this is better to put after
the write? What would you expect `WriteBatch` and `NewBufferedRowGroup` to be
like?
--
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]