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

Function write_batches

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

Source from the content-addressed store, hash-verified

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

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