Commits


Raúl Cumplido authored and Alessandro Molina committed ccaef092c29
ARROW-16025: [Python][C++] Fix segmentation fault when closing ORCFileWritter This PR fixes ARROW-16025 (Calling nonexistent method of pyarrow.orc.ORCWriter causes segfault). The segmentation fault can be reproduced with the test: ```python def test_wrong_usage_orc_writer(tempdir): from pyarrow import orc path = str(tempdir / 'test.orc') with orc.ORCWriter(path) as writer: with pytest.raises(AttributeError): writer.test() ``` The issue was that closing `ORCFileWriter` without actually writing was trying to close a null writer (`writer_->close();`) causing the segmentation fault. Closes #12816 from raulcd/ARROW-16025 Authored-by: Raúl Cumplido <raulcumplido@gmail.com> Signed-off-by: Alessandro Molina <amol@turbogears.org>