mathyingzhou commented on a change in pull request #8648: URL: https://github.com/apache/arrow/pull/8648#discussion_r614527666
########## File path: cpp/src/arrow/adapters/orc/adapter.h ########## @@ -142,6 +143,36 @@ class ARROW_EXPORT ORCFileReader { ORCFileReader(); }; +/// \class ORCFileWriter +/// \brief Write an Arrow Table or RecordBatch to an ORC file. +class ARROW_EXPORT ORCFileWriter { + public: + ~ORCFileWriter(); + /// \brief Creates a new ORC writer. + /// + /// \param[in] output_stream a pointer to the io::OutputStream to write into + /// \return the returned writer object + static Result<std::unique_ptr<ORCFileWriter>> Open(io::OutputStream* output_stream); + + /// \brief Write a table + /// + /// \param[in] table the Arrow table from which data is extracted + /// \return Status + Status Write(const Table& table); + + /// \brief Close a file Review comment: It closes the `std::unique_ptr<liborc::Writer> writer_` so yes closure does take place. Hold on.. -- 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