mathyingzhou commented on a change in pull request #8648:
URL: https://github.com/apache/arrow/pull/8648#discussion_r594782467



##########
File path: python/pyarrow/tests/test_orc.py
##########
@@ -163,3 +163,15 @@ def test_orcfile_empty(datadir):
         ]))),
     ])
     assert table.schema == expected_schema
+
+
+def test_orcfile_readwrite():
+    from pyarrow import orc
+    buffer_output_stream = pa.BufferOutputStream()
+    a = pa.array([1, None, 3, None])
+    b = pa.array([None, 'Arrow', None, 'ORC'])
+    table = pa.table({"int64": a, "utf8": b})
+    orc.write_table(buffer_output_stream, table)
+    buffer_reader = pa.BufferReader(buffer_output_stream.getvalue())
+    outputTable = orc.ORCFile(buffer_reader).read()
+    assert table.equals(outputTable)

Review comment:
       Ah sorry I didn't see this one. 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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to