kou commented on code in PR #38888:
URL: https://github.com/apache/arrow/pull/38888#discussion_r1408654016


##########
cpp/src/arrow/filesystem/azurefs.cc:
##########
@@ -1017,69 +1089,67 @@ class AzureFileSystem::Impl {
             exception);
       }
     } else {
-      auto container_client =
-          blob_service_client_->GetBlobContainerClient(location.container);
-      Azure::Storage::Blobs::ListBlobsOptions options;
-      options.Prefix = internal::EnsureTrailingSlash(location.path);
-      // 
https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch#remarks
-      //
-      // Only supports up to 256 subrequests in a single batch. The
-      // size of the body for a batch request can't exceed 4 MB.
-      const int32_t kNumMaxRequestsInBatch = 256;
-      options.PageSizeHint = kNumMaxRequestsInBatch;
+      return DeleteDirContentsWihtoutHierarchicalNamespace(location, true);
+    }
+  }
+
+  Status DeleteDirContents(const AzureLocation& location, bool missing_dir_ok) 
{
+    if (location.container.empty()) {
+      return internal::InvalidDeleteDirContents(location.all);
+    }
+    if (location.path.empty()) {
+      return internal::InvalidDeleteDirContents(location.all);

Review Comment:
   Can we clarify this discussion?
   
   What should be "root dir"?
   
   1. ` `: Empty location (no container and no path)
   2. `container` and `container/`: Container only
   3. `container/path`: Container and path
   
   My opinion and the current implementation:
   
   1. Root dir
   2. Root dir
   3. Not root dir
   
   FYI: s3fs:
   
   1. ` `: Empty path (no bucket and no key): Root dir
   2. `bucket` and `bucket/`: Bucket only: Not root dir
   3. `bucket/key`: Bucket and key: Not root dir
   
   
   @Tom-Newton What do you think about this as an Azure Blob Storage user? I'm 
not an Azure Blob Storage user.



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