MCPcopy
hub / github.com/huggingface/datasets / test_in_memory_arrow_table_from_buffer

Function test_in_memory_arrow_table_from_buffer

tests/test_table.py:128–136  ·  view source on GitHub ↗
(in_memory_pa_table)

Source from the content-addressed store, hash-verified

126
127
128def test_in_memory_arrow_table_from_buffer(in_memory_pa_table):
129 with assert_arrow_memory_increases():
130 buf_writer = pa.BufferOutputStream()
131 writer = pa.RecordBatchStreamWriter(buf_writer, schema=in_memory_pa_table.schema)
132 writer.write_table(in_memory_pa_table)
133 writer.close()
134 buf_writer.close()
135 pa_table = _in_memory_arrow_table_from_buffer(buf_writer.getvalue())
136 assert in_memory_pa_table == pa_table
137
138
139def test_memory_mapped_arrow_table_from_file(arrow_file, in_memory_pa_table):

Callers

nothing calls this directly

Calls 4

write_tableMethod · 0.80
closeMethod · 0.80

Tested by

no test coverage detected