Skip to content

Commit

Permalink
Auto-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Newton committed Feb 18, 2024
1 parent 26d6e96 commit ab02113
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
12 changes: 6 additions & 6 deletions cpp/src/arrow/filesystem/azurefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ class ObjectInputFile final : public io::RandomAccessFile {

Status Init() {
if (content_length_ != kNoSize) {
// When the user provides the file size we don't validate that its a file. This is
// When the user provides the file size we don't validate that its a file. This is
// only a read so its not a big deal if the user make a mistake.
DCHECK_GE(content_length_, 0);
return Status::OK();
Expand Down Expand Up @@ -747,11 +747,11 @@ class ObjectAppendStream final : public io::OutputStream {
if (truncate_) {
content_length_ = 0;
pos_ = 0;
// Create an empty file overwriting any existing file, but fail if there is an
// Create an empty file overwriting any existing file, but fail if there is an
// existing directory.
RETURN_NOT_OK(ensure_not_flat_namespace_directory_());
// On hierarchical namespace CreateEmptyBlockBlob will fail if there is an existing
// directory so we don't need to check like we do on flat namespace.
// On hierarchical namespace CreateEmptyBlockBlob will fail if there is an existing
// directory so we don't need to check like we do on flat namespace.
RETURN_NOT_OK(CreateEmptyBlockBlob(*block_blob_client_));
} else {
try {
Expand All @@ -763,7 +763,7 @@ class ObjectAppendStream final : public io::OutputStream {
pos_ = content_length_;
} catch (const Storage::StorageException& exception) {
if (exception.StatusCode == Http::HttpStatusCode::NotFound) {
// No file exists but on flat namespace its possible there is a directory
// No file exists but on flat namespace its possible there is a directory
// marker or an implied directory. Ensure there is no directory before starting
// a new empty file.
RETURN_NOT_OK(ensure_not_flat_namespace_directory_());
Expand Down Expand Up @@ -831,7 +831,7 @@ class ObjectAppendStream final : public io::OutputStream {
Status Flush() override {
RETURN_NOT_OK(CheckClosed("flush"));
if (!initialised_) {
// If the stream has not been successfully initialized then there is nothing to
// If the stream has not been successfully initialized then there is nothing to
// flush. This also avoids some unhandled errors when flushing in the destructor.
return Status::OK();
}
Expand Down
5 changes: 2 additions & 3 deletions cpp/src/arrow/filesystem/azurefs_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -851,8 +851,8 @@ class TestAzureFileSystem : public ::testing::Test {

auto path2 = data.Path("directory2");
ASSERT_OK(fs()->OpenOutputStream(path2));
// CreateDir returns OK even if there is already a file or directory at this
// location. Whether or not this is the desired behaviour is debatable.
// CreateDir returns OK even if there is already a file or directory at this
// location. Whether or not this is the desired behaviour is debatable.
ASSERT_OK(fs()->CreateDir(path2));
AssertFileInfo(fs(), path2, FileType::File);
}
Expand Down Expand Up @@ -2214,7 +2214,6 @@ TEST_F(TestAzuriteFileSystem, WriteMetadata) {
.Value.Metadata;
// Defaults are overwritten and not merged.
EXPECT_EQ(Core::CaseInsensitiveMap{std::make_pair("bar", "baz")}, blob_metadata);

}

TEST_F(TestAzuriteFileSystem, OpenOutputStreamSmall) {
Expand Down

0 comments on commit ab02113

Please sign in to comment.