(tempdir, dataset_reader)
| 3367 | |
| 3368 | |
| 3369 | def test_ipc_format(tempdir, dataset_reader): |
| 3370 | table = pa.table({'a': pa.array([1, 2, 3], type="int8"), |
| 3371 | 'b': pa.array([.1, .2, .3], type="float64")}) |
| 3372 | |
| 3373 | path = str(tempdir / 'test.arrow') |
| 3374 | with pa.output_stream(path) as sink: |
| 3375 | writer = pa.RecordBatchFileWriter(sink, table.schema) |
| 3376 | writer.write_batch(table.to_batches()[0]) |
| 3377 | writer.close() |
| 3378 | |
| 3379 | dataset = ds.dataset(path, format=ds.IpcFileFormat()) |
| 3380 | result = dataset_reader.to_table(dataset) |
| 3381 | assert result.equals(table) |
| 3382 | |
| 3383 | assert_dataset_fragment_convenience_methods(dataset) |
| 3384 | |
| 3385 | for format_str in ["ipc", "arrow"]: |
| 3386 | dataset = ds.dataset(path, format=format_str) |
| 3387 | result = dataset_reader.to_table(dataset) |
| 3388 | assert result.equals(table) |
| 3389 | |
| 3390 | |
| 3391 | @pytest.mark.orc |
nothing calls this directly
no test coverage detected