(tmpdir)
| 260 | |
| 261 | |
| 262 | def 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 | |
| 281 | def test_bytesio_readwrite(): |
nothing calls this directly
no test coverage detected