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

Function _roundtrip_table

python/pyarrow/tests/parquet/common.py:49–57  ·  view source on GitHub ↗
(table, read_table_kwargs=None,
                     write_table_kwargs=None)

Source from the content-addressed store, hash-verified

47
48
49def _roundtrip_table(table, read_table_kwargs=None,
50 write_table_kwargs=None):
51 read_table_kwargs = read_table_kwargs or {}
52 write_table_kwargs = write_table_kwargs or {}
53
54 writer = pa.BufferOutputStream()
55 _write_table(table, writer, **write_table_kwargs)
56 reader = pa.BufferReader(writer.getvalue())
57 return _read_table(reader, **read_table_kwargs)
58
59
60def _check_roundtrip(table, expected=None, read_table_kwargs=None,

Callers 5

test_list_typesFunction · 0.90
test_binary_typesFunction · 0.90
_check_roundtripFunction · 0.85

Calls 4

_write_tableFunction · 0.85
_read_tableFunction · 0.85
BufferOutputStreamMethod · 0.80
BufferReaderMethod · 0.80

Tested by 3

test_list_typesFunction · 0.72
test_binary_typesFunction · 0.72