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


##########
cpp/src/arrow/filesystem/azurefs.cc:
##########
@@ -1642,11 +1642,27 @@ class AzureFileSystem::Impl {
       options.Prefix = {};
       found = true;  // Unless the container itself is not found later!
     } else {
-      options.Prefix = internal::EnsureTrailingSlash(base_location.path);
+      ARROW_ASSIGN_OR_RAISE(
+          auto prefix, AzureLocation::FromString(
+                           
std::string(internal::EnsureTrailingSlash(select.base_dir))));
+      ARROW_ASSIGN_OR_RAISE(auto info, GetFileInfo(container_client, prefix));
+      if (info.type() == FileType::NotFound) {
+        if (select.allow_not_found) {
+          return Status::OK();
+        } else {
+          return PathNotFound(base_location);
+        }
+      } else if (info.type() != FileType::Directory) {
+        return NotADir(base_location);
+      }
+      options.Prefix = prefix.path;
     }
     options.PageSizeHint = page_size_hint;
     options.Include = Blobs::Models::ListBlobsIncludeFlags::Metadata;
 
+    auto adlfs_client = GetFileSystemClient(base_location.container);
+    ARROW_ASSIGN_OR_RAISE(auto hns_support, 
HierarchicalNamespaceSupport(adlfs_client));

Review Comment:
   > ADLFS calls "filesystem" what "blobs" calls "container"
   
   Wow! I didn't notice it!



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