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

Function write_stream

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

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

(rb: &RecordBatch)

Source from the content-addressed store, hash-verified

2469
2470 /// Write the record batch to an in-memory buffer in IPC Stream format
2471 fn write_stream(rb: &RecordBatch) -> Vec<u8> {
2472 let mut buf = Vec::new();
2473 let mut writer = crate::writer::StreamWriter::try_new(&mut buf, rb.schema_ref()).unwrap();
2474 writer.write(rb).unwrap();
2475 writer.finish().unwrap();
2476 buf
2477 }
2478
2479 /// Return the first record batch read from the IPC Stream buffer
2480 fn read_stream(buf: &[u8]) -> Result<RecordBatch, ArrowError> {

Calls 4

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