Hi,

Yes. It's zero-copy.

See also the documentation of
arrow::ipc::StreamDecoder::next_required_size():
https://arrow.apache.org/docs/cpp/api/ipc.html#_CPPv4NK5arrow3ipc13StreamDecoder18next_required_sizeEv

Thanks,
-- 
kou

In <cack8hr54fpzon8tfnzaqdlccjloezqwwglxu6wknbatm0j4...@mail.gmail.com>
  "StreamDecoder zero-copy (?) for pre-framed contiguous Messages" on Fri, 1 
Jul 2022 15:18:43 -0500,
  John Muehlhausen <j...@jgm.org> wrote:

> If I call `Consume(std::shared_ptr<Buffer> buffer)` and it is already
> pre-framed to contain (e.g.) an entire RecordBatch Message and nothing
> else, will it use this Buffer in zero-copy mode when calling my
> Listener::OnRecordBatchDecoded() implementation?  I.e. will data in that
> RecordBatch refer directly to the original Buffer I passed in?
> 
> If not, how can we get this functionality?  I have a stream transport that
> can preserve Message boundaries and yield ownership of that contiguous
> memory.
> 
> Thanks,
> John

Reply via email to