MCPcopy Create free account
hub / github.com/apache/arrow / test_orcfile_readwrite

Function test_orcfile_readwrite

python/pyarrow/tests/test_orc.py:262–278  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

260
261
262def test_orcfile_readwrite(tmpdir):
263 from pyarrow import orc
264 a = pa.array([1, None, 3, None])
265 b = pa.array([None, "Arrow", None, "ORC"])
266 table = pa.table({"int64": a, "utf8": b})
267 file = tmpdir.join("test.orc")
268 orc.write_table(table, file)
269 output_table = orc.read_table(file)
270 assert table.equals(output_table)
271
272 output_table = orc.read_table(file, [])
273 assert 4 == output_table.num_rows
274 assert 0 == output_table.num_columns
275
276 output_table = orc.read_table(file, columns=["int64"])
277 assert 4 == output_table.num_rows
278 assert 1 == output_table.num_columns
279
280
281def test_bytesio_readwrite():

Callers

nothing calls this directly

Calls 5

equalsMethod · 0.80
arrayMethod · 0.45
joinMethod · 0.45
write_tableMethod · 0.45
read_tableMethod · 0.45

Tested by

no test coverage detected