pitrou commented on code in PR #45310:
URL: https://github.com/apache/arrow/pull/45310#discussion_r1924872087
##########
cpp/src/arrow/filesystem/s3fs.cc:
##########
@@ -1983,27 +1983,32 @@ class ObjectOutputStream final : public
io::OutputStream {
const void* data, int64_t nbytes, std::shared_ptr<Buffer> owned_buffer =
nullptr) {
req.SetBucket(ToAwsString(path_.bucket));
req.SetKey(ToAwsString(path_.key));
- req.SetBody(std::make_shared<StringViewStream>(data, nbytes));
req.SetContentLength(nbytes);
RETURN_NOT_OK(SetSSECustomerKey(&req, sse_customer_key_));
if (!background_writes_) {
- req.SetBody(std::make_shared<StringViewStream>(data, nbytes));
+ // (GH-45304: avoid setting a body stream if length is 0)
Review Comment:
Ok, done. Thanks for the suggestion.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]