felipecrv commented on code in PR #38708:
URL: https://github.com/apache/arrow/pull/38708#discussion_r1397948435
##########
cpp/src/arrow/filesystem/azurefs_test.cc:
##########
@@ -451,10 +470,14 @@ TEST_F(AzureHierarchicalNamespaceFileSystemTest,
CreateDirRecursiveSuccessDirect
arrow::fs::AssertFileInfo(fs_.get(), parent, FileType::Directory);
}
-TEST_F(AzuriteFileSystemTest, CreateDirRecursiveFailureDirectoryOnly) {
+TEST_F(AzuriteFileSystemTest, CreateDirRecursiveSuccessDirectoryOnly) {
const auto parent = PreexistingContainerPath() + RandomDirectoryName();
const auto path = internal::ConcatAbstractPath(parent, "new-sub");
- ASSERT_RAISES(NotImplemented, fs_->CreateDir(path, true));
+ ASSERT_OK(fs_->CreateDir(path, true));
+ // There is only virtual directory without hierarchical namespace
+ // support. So the CreateDir() does nothing.
+ arrow::fs::AssertFileInfo(fs_.get(), path, FileType::NotFound);
+ arrow::fs::AssertFileInfo(fs_.get(), parent, FileType::NotFound);
Review Comment:
If we can disambiguate "file exists?" queries in the filesystem API, we
should probably always reply true when the caller is asking if a directory
exists. If creating a directory is a no-op that succeeds, the post-condition of
CreateDir -- the directory now exists -- should be true.
There are might be bad consequences of this, so this is more of an idea than
a 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]