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

Function write_batches

python/pyarrow/tests/test_ipc.py:631–640  ·  view source on GitHub ↗
(batches, as_table=False)

Source from the content-addressed store, hash-verified

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

Callers 1

test_dictionary_deltaFunction · 0.85

Calls 3

write_batchMethod · 0.80
_get_writerMethod · 0.45
write_tableMethod · 0.45

Tested by

no test coverage detected