joeyac commented on issue #9311: URL: https://github.com/apache/arrow/issues/9311#issuecomment-766898581
finally, I found the related source code: https://github.com/apache/arrow/blob/master/cpp/src/arrow/io/memory.cc#L351 before this line, `buffer_` from `StdinStream` is mutable, but `buffer` sliced by `SliceBuffer` returns an immutable `buffer` by default. I replace ```cpp return SliceBuffer(buffer_, position, nbytes); ``` with ```cpp if (buffer_->is_mutable()) return SliceMutableBuffer(buffer_, position, nbytes); else return SliceBuffer(buffer_, position, nbytes); ``` then I can modify data with mutable data ptr. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
