quanghgx commented on code in PR #38390:
URL: https://github.com/apache/arrow/pull/38390#discussion_r1376483902


##########
cpp/src/parquet/arrow/writer.cc:
##########
@@ -319,6 +319,7 @@ class FileWriterImpl : public FileWriter {
       closed_ = true;
       if (row_group_writer_ != nullptr) {
         PARQUET_CATCH_NOT_OK(row_group_writer_->Close());
+        row_group_writer_ = nullptr;  // To avoid double closing

Review Comment:
   > Also, a bit curious that when would it double-close here?
   
   It will be closed again, in:
   
https://github.com/apache/arrow/blob/450175b2dbfc7834be72883c5a0e6ac93e8ed5aa/cpp/src/parquet/arrow/writer.cc#L308-L314
   
   This is surely not intended normal use case (use after closed). Let me do 
one more check for why calling ```row_group_writer_->Close()``` twice also 
causes segfault and report back.



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