mathyingzhou commented on a change in pull request #8648: URL: https://github.com/apache/arrow/pull/8648#discussion_r614606429
########## File path: python/pyarrow/_orc.pyx ########## @@ -109,3 +113,28 @@ cdef class ORCReader(_Weakrefable): check_status(deref(self.reader).Read(indices, &sp_table)) return pyarrow_wrap_table(sp_table) + +cdef class ORCWriter(_Weakrefable): + cdef: + object source + unique_ptr[ORCFileWriter] writer + + def open(self, object source): + cdef: + shared_ptr[COutputStream] rd_handle + self.source = source + get_writer(source, &rd_handle) + with nogil: + self.writer = move(GetResultValue[unique_ptr[ORCFileWriter]]( + ORCFileWriter.Open(rd_handle.get()))) Review comment: Thanks! Given that we use the `pImpl` pattern for `ORCFileWriter` (and in fact `ORCFileReader` as well) I will store it in the Python `ORCWriter` object. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org