You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
arrow-ipc StreamWriter better ergonomics with async #7812
This came up in Datafusion: apache/datafusion#23247
I would actually like to propose a slightly different API here: a "sans IO" encoder -- specfically an encoder that does no IO
// Not there is no IO / stream:letmut encoder = StreamEncoder::try_new_with_options(&schema, options).unwrap();// Encode a batch to buffers
writer.encode(&batch1).unwrap();// for buffer in writer.take_buffers(){// bufers is Vec<Vec<u8>> that has encoded IPC data and can be// written to a stream, etc}
Activity
alamb commentedon Jun 28, 2025
Maybe we can follow a similar pattern to parquet where there is a separate async API
alamb commentedon Jul 25, 2025
Note that you could also write to a buffer (
Vec<u8>for example) and then send that buffer with async writeDefinitely not as ergonomic as something built in
alamb commentedon Jul 1, 2026
This came up in Datafusion: apache/datafusion#23247
I would actually like to propose a slightly different API here: a "sans IO" encoder -- specfically an encoder that does no IO
I recommend something like the BatchCoalecer API: https://docs.rs/arrow/latest/arrow/compute/struct.BatchCoalescer.html where the output is written to buffers
I think this could be a pretty thin wrapper around https://docs.rs/arrow-ipc/latest/arrow_ipc/writer/struct.IpcDataGenerator.html
Phoenix500526 commentedon Jul 3, 2026
Hi @alamb . I open a PR to add the sans-IO stream encoder. Could you take a look when you have time? Thanks.
test(arrow-ipc): cover async stream encoding
test(arrow-ipc): cover async stream encoding
test(arrow-ipc): cover async stream encoding
feat(arrow-ipc): add sans-IO stream encoder
test(arrow-ipc): cover async stream encoding
feat(arrow-ipc): add sans-IO stream encoder
test(arrow-ipc): cover async stream encoding
perf(ipc): specialize message sinks
refactor(ipc): simplify message sink
feat(arrow-ipc): add sans-IO stream encoder
test(arrow-ipc): cover async stream encoding
perf(ipc): specialize message sinks
refactor(ipc): simplify message sink
feat(arrow-ipc): add sans-IO stream encoder (#10277)