wgtmac commented on code in PR #35520:
URL: https://github.com/apache/arrow/pull/35520#discussion_r1189506915


##########
cpp/src/parquet/file_writer.cc:
##########
@@ -219,17 +219,17 @@ class RowGroupSerializer : public 
RowGroupWriter::Contents {
       closed_ = true;
       CheckRowsWritten();
 
-      for (size_t i = 0; i < column_writers_.size(); i++) {
-        if (column_writers_[i]) {
-          total_bytes_written_ += column_writers_[i]->Close();
+      // If ColumnWriter::Close thrown an exception, avoid
+      // have bad states in column_writers_.

Review Comment:
   This is true if the exception happens when calling 
`FileSerializer::Close()`. What if this happens when the user directly calls 
`RowGroupWriter::Close()` to close the current row group and starts a new one?



-- 
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]

Reply via email to