felipecrv commented on code in PR #39298:
URL: https://github.com/apache/arrow/pull/39298#discussion_r1431521690
##########
cpp/src/arrow/filesystem/azurefs.cc:
##########
@@ -879,11 +968,14 @@ class AzureFileSystem::Impl {
return info;
} catch (const Storage::StorageException& exception) {
if (exception.StatusCode == Http::HttpStatusCode::NotFound) {
- ARROW_ASSIGN_OR_RAISE(auto hierarchical_namespace_enabled,
- hns_detector_.Enabled(location.container));
- if (hierarchical_namespace_enabled) {
- // If the hierarchical namespace is enabled, then the storage
account will have
- // explicit directories. Neither a file nor a directory was found.
+ auto adlfs_client =
+ datalake_service_client_->GetFileSystemClient(location.container);
+ ARROW_ASSIGN_OR_RAISE(auto hns_support,
+ HierarchicalNamespaceSupport(adlfs_client));
+ if (hns_support == HNSSupport::kContainerNotFound ||
+ hns_support == HNSSupport::kEnabled) {
+ // If the hierarchical namespace is enabled, then the storage
account will
+ // have explicit directories. Neither a file nor a directory was
found.
Review Comment:
These refactorings preserve the existing semantics as the goal of this PR is
just rewriting the HNS check, but I'm changing the semantics of directory
operations in a follow-up PR.
--
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]