quanghgx commented on PR #38390: URL: https://github.com/apache/arrow/pull/38390#issuecomment-1785596524
> Actually this change LGTM. But I'm not fully understand why `row_group_writer_` will be double-closed. For example, when call `FileWriter::Close` twice, the `closed_` will be true, so `row_group_writer_` will only close once. Did I miss something? you are right, normally, it will not be called twice. However, in test case for use-after-close with ```writer->Close()``` and then ```writer->NewBufferedRowGroup()```: https://github.com/apache/arrow/blob/450175b2dbfc7834be72883c5a0e6ac93e8ed5aa/cpp/src/parquet/arrow/arrow_reader_writer_test.cc#L5227-L5237 To be honest, I think I need to study a bit more to fully understand state diagram of these there attributes {```writer_```, ```row_group_writer_``` and ```closed_``` } of FileWriterImpl. If you have hints for me, that will be great? https://github.com/apache/arrow/blob/450175b2dbfc7834be72883c5a0e6ac93e8ed5aa/cpp/src/parquet/arrow/writer.cc#L479-L483 Thank you so much @mapleFU -- 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]
