iajoiner commented on a change in pull request #9702:
URL: https://github.com/apache/arrow/pull/9702#discussion_r787122768
##########
File path: python/pyarrow/orc.py
##########
@@ -143,35 +282,63 @@ def write(self, table):
table : pyarrow.lib.Table
The table to be written into the ORC file
"""
+ assert self.is_open
self.writer.write(table)
def close(self):
"""
Close the ORC file
"""
- self.writer.close()
+ if self.is_open:
+ self.writer.close()
+ self.is_open = False
-def write_table(table, where):
- """
- Write a table into an ORC file
-
- Parameters
- ----------
- table : pyarrow.lib.Table
- The table to be written into the ORC file
- where : str or pyarrow.io.NativeFile
- Writable target. For passing Python file objects or byte buffers,
- see pyarrow.io.PythonFileInterface, pyarrow.io.BufferOutputStream
- or pyarrow.io.FixedSizeBufferWriter.
- """
+def write_table(table, where, file_version='0.12',
Review comment:
Fixed.
--
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]