(batches, as_table=False)
| 605 | schema = batches[0].schema |
| 606 | |
| 607 | def write_batches(batches, as_table=False): |
| 608 | with format_fixture._get_writer(pa.MockOutputStream(), |
| 609 | schema) as writer: |
| 610 | if as_table: |
| 611 | table = pa.Table.from_batches(batches) |
| 612 | writer.write_table(table) |
| 613 | else: |
| 614 | for batch in batches: |
| 615 | writer.write_batch(batch) |
| 616 | return writer.stats |
| 617 | |
| 618 | if format_fixture.is_file: |
| 619 | # File format cannot handle replacement |
no test coverage detected