[
https://issues.apache.org/jira/browse/ARROW-6527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16927541#comment-16927541
]
Antoine Pitrou commented on ARROW-6527:
---------------------------------------
Concrete case which motivated this issue. With ARROW-6357, the S3 FileSystem
implementation supports background writes. However, it must make sure the data
remains valid until written, so has to make a copy. This is wasteful when e.g.
writing a RecordBatch which is backed by owned read-only buffers.
[[email protected]] [~wesmckinn]
> [C++] Add OutputStream::Write() variant taking an owned buffer
> --------------------------------------------------------------
>
> Key: ARROW-6527
> URL: https://issues.apache.org/jira/browse/ARROW-6527
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Antoine Pitrou
> Priority: Major
>
> When Write() takes an arbitrary data pointer and needs to buffer it, it is
> mandatory to copy the data because the pointer may go stale, or the data may
> be overwritten.
> Buf if the user has an immutable Buffer, then it should be enough to store
> the Buffer as necessary, without doing a memory copy. We could add a special
> Write() variant for that.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)