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

Function test_write_empty_ipc_file

python/pyarrow/tests/test_ipc.py:1176–1189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1174
1175
1176def test_write_empty_ipc_file():
1177 # ARROW-3894: IPC file was not being properly initialized when no record
1178 # batches are being written
1179 schema = pa.schema([('field', pa.int64())])
1180
1181 sink = pa.BufferOutputStream()
1182 with pa.ipc.new_file(sink, schema):
1183 pass
1184
1185 buf = sink.getvalue()
1186 with pa.RecordBatchFileReader(pa.BufferReader(buf)) as reader:
1187 table = reader.read_all()
1188 assert len(table) == 0
1189 assert table.schema.equals(schema)
1190
1191
1192def test_py_record_batch_reader():

Callers

nothing calls this directly

Calls 6

lenFunction · 0.85
BufferOutputStreamMethod · 0.80
RecordBatchFileReaderMethod · 0.80
BufferReaderMethod · 0.80
equalsMethod · 0.80
schemaMethod · 0.45

Tested by

no test coverage detected