Phoenix500526 commented on code in PR #10277:
URL: https://github.com/apache/arrow-rs/pull/10277#discussion_r3651596534
##########
arrow-ipc/src/writer.rs:
##########
@@ -2523,6 +2795,116 @@ mod tests {
stream_reader.next().unwrap().unwrap()
}
+ /// Encodes record batches with [`StreamEncoder`] into one contiguous byte
vector.
+ ///
+ /// This mirrors callers that need IPC stream bytes without a synchronous
+ /// [`Write`] implementation, such as encoding buffers before forwarding
them
+ /// to an async sink.
+ fn encode_stream(
+ schema: &Schema,
+ batches: &[RecordBatch],
+ options: IpcWriteOptions,
+ ) -> Vec<u8> {
+ let mut encoder = StreamEncoder::try_new_with_options(schema,
options).unwrap();
+ let mut bytes = Vec::new();
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]