cyb70289 commented on code in PR #13250: URL: https://github.com/apache/arrow/pull/13250#discussion_r884840369
########## cpp/src/arrow/io/buffered.cc: ########## @@ -144,6 +144,8 @@ class BufferedOutputStream::Impl : public BufferedBase { RETURN_NOT_OK(FlushUnlocked()); DCHECK_EQ(buffer_pos_, 0); if (nbytes >= buffer_size_) { + // Invalidate cached raw pos + raw_pos_ = -1; Review Comment: A bit complicated as `raw_->Write(buffer)` may error, and don't know exactly how many bytes are written? -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org