MCPcopy Create free account
hub / github.com/apache/arrow-rs / write_ipc

Function write_ipc

arrow-ipc/src/reader.rs:2397–2403  ·  view source on GitHub ↗

Write the record batch to an in-memory buffer in IPC File format

(rb: &RecordBatch)

Source from the content-addressed store, hash-verified

2395
2396 /// Write the record batch to an in-memory buffer in IPC File format
2397 fn write_ipc(rb: &RecordBatch) -> Vec<u8> {
2398 let mut buf = Vec::new();
2399 let mut writer = crate::writer::FileWriter::try_new(&mut buf, rb.schema_ref()).unwrap();
2400 writer.write(rb).unwrap();
2401 writer.finish().unwrap();
2402 buf
2403 }
2404
2405 /// Return the first record batch read from the IPC File buffer
2406 fn read_ipc(buf: &[u8]) -> Result<RecordBatch, ArrowError> {

Callers 2

roundtrip_ipcFunction · 0.85

Calls 4

try_newFunction · 0.85
schema_refMethod · 0.80
writeMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected