Tom-Newton commented on code in PR #38708:
URL: https://github.com/apache/arrow/pull/38708#discussion_r1397960992


##########
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:
   It's an interring point. I don't feel strongly but personally I think the 
current behaviour is the best option. 
   
   `GetFileInfo` will return that a directory is present if at least one "file" 
has been created in that "directory". I think this behaviour is consistent with 
the GCS filesystem. 



-- 
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]

Reply via email to