pitrou commented on code in PR #39207:
URL: https://github.com/apache/arrow/pull/39207#discussion_r1426955052


##########
cpp/src/arrow/filesystem/azurefs.cc:
##########
@@ -33,42 +33,85 @@
 #include "arrow/util/logging.h"
 #include "arrow/util/string.h"
 
-namespace arrow {
-namespace fs {
+namespace arrow::fs {
+
+namespace Blobs = Azure::Storage::Blobs;
+namespace Core = Azure::Core;
+namespace DataLake = Azure::Storage::Files::DataLake;
+namespace Storage = Azure::Storage;
 
 // -----------------------------------------------------------------------
 // AzureOptions Implementation
 
 AzureOptions::AzureOptions() = default;
 
+AzureOptions::~AzureOptions() = default;
+
 bool AzureOptions::Equals(const AzureOptions& other) const {
-  return (account_dfs_url == other.account_dfs_url &&
-          account_blob_url == other.account_blob_url &&
-          credentials_kind == other.credentials_kind &&
-          default_metadata == other.default_metadata);
+  // TODO(GH-38598): update here when more auth methods are added.
+  const bool ret = backend == other.backend &&
+                   default_metadata == other.default_metadata &&
+                   account_blob_url_ == other.account_blob_url_ &&
+                   account_dfs_url_ == other.account_dfs_url_ &&
+                   credential_kind_ == other.credential_kind_;
+  if (!ret) {
+    return false;
+  }
+  switch (credential_kind_) {
+    case CredentialKind::kAnonymous:
+      return true;
+    case CredentialKind::kStorageSharedKeyCredential:
+      return storage_shared_key_credential_->AccountName ==
+             other.storage_shared_key_credential_->AccountName;
+  }
+  DCHECK(false);
+  return false;

Review Comment:
   +1, thank you.



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