(batches, as_table=False)
| 629 | schema = batches[0].schema |
| 630 | |
| 631 | def write_batches(batches, as_table=False): |
| 632 | with format_fixture._get_writer(pa.MockOutputStream(), |
| 633 | schema) as writer: |
| 634 | if as_table: |
| 635 | table = pa.Table.from_batches(batches) |
| 636 | writer.write_table(table) |
| 637 | else: |
| 638 | for batch in batches: |
| 639 | writer.write_batch(batch) |
| 640 | return writer.stats |
| 641 | |
| 642 | if format_fixture.is_file: |
| 643 | # File format cannot handle replacement |
no test coverage detected