mapleFU opened a new issue, #38117: URL: https://github.com/apache/arrow/issues/38117
### Describe the enhancement requested This is the case described in https://github.com/apache/arrow/pull/35520 . But I didn't find it when previous meet the bug because I just use release build. ```c++ void Close() override { if (!closed_) { closed_ = true; CheckRowsWritten(); // Avoid invalid state if ColumnWriter::Close() throws internally. auto column_writers = std::move(column_writers_); for (size_t i = 0; i < column_writers.size(); i++) { if (column_writers[i]) { total_bytes_written_ += column_writers[i]->Close(); total_compressed_bytes_written_ += column_writers[i]->total_compressed_bytes_written(); } } // Ensures all columns have been written metadata_->set_num_rows(num_rows_); metadata_->Finish(total_bytes_written_, row_group_ordinal_); } } ``` When close file with 10 columns, assume column writer 2 has exception on `Close`, it throw an exception. and the third one is a `DictEncoder`, so it would `DCHECK` failed: ```c++ ~DictEncoderImpl() override { DCHECK(buffered_indices_.empty()); } ``` ### Component(s) C++, Parquet -- 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]
