Skip to content

Commit

Permalink
PR feedback pitrou #2
Browse files Browse the repository at this point in the history
  • Loading branch information
OliLay authored and pitrou committed Aug 21, 2024
1 parent 147f6de commit 2a37491
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cpp/src/arrow/filesystem/azurefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1198,9 +1198,10 @@ class ObjectAppendStream final : public io::OutputStream {
}

// We can upload chunks without copying them into a buffer
while (nbytes >= kMaxBlockSizeBytes) {
RETURN_NOT_OK(AppendBlock(data_ptr, kMaxBlockSizeBytes));
advance_ptr(kMaxBlockSizeBytes);
while (nbytes >= kBlockUploadSizeBytes) {
const auto upload_size = std::min(nbytes, kMaxBlockSizeBytes);
RETURN_NOT_OK(AppendBlock(data_ptr, upload_size));
advance_ptr(upload_size);
}

// Buffer remaining bytes
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/filesystem/azurefs_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
#include <memory>
#include <random>
#include <string>
#include <vector>

#include <gmock/gmock-matchers.h>
#include <gmock/gmock-more-matchers.h>
#include <gtest/gtest.h>
#include <azure/storage/blobs.hpp>
#include <azure/storage/common/storage_credential.hpp>
#include <azure/storage/files/datalake.hpp>
#include <vector>

#include "arrow/filesystem/path_util.h"
#include "arrow/filesystem/test_util.h"
Expand Down

0 comments on commit 2a37491

Please sign in to comment.