pitrou commented on code in PR #39211:
URL: https://github.com/apache/arrow/pull/39211#discussion_r1425348724
##########
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:
Ah, I had missed the `offset += batch_size` above. So this avoids having a
0-sized row group at the end of the file?
--
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]