pitrou commented on PR #35520:
URL: https://github.com/apache/arrow/pull/35520#issuecomment-1540546202
I think we should instead prevent `RowGroupSerializer::Close` from creating
an invalid internal state. For example:
```c++
void Close() override {
if (!closed_) {
closed_ = true;
CheckRowsWritten();
auto column_writers = std::move(columns_writers_);
for (const auto writer : column_writers) {
if (writer) {
total_bytes_written_ += writer->Close();
total_compressed_bytes_written_ +=
writer->total_compressed_bytes_written();
}
}
// Ensures all columns have been written
metadata_->set_num_rows(num_rows_);
metadata_->Finish(total_bytes_written_, row_group_ordinal_);
}
}
```
--
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]