Write the record batch to an in-memory buffer in IPC File format
(rb: &RecordBatch)
| 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> { |
no test coverage detected