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


##########
cpp/src/arrow/filesystem/azurefs.cc:
##########
@@ -72,42 +74,59 @@ bool AzureOptions::Equals(const AzureOptions& other) const {
   return false;
 }
 
-void AzureOptions::SetUrlsForAccountName(const std::string& account_name) {
-  if (this->backend == AzureBackend::kAzurite) {
-    account_blob_url_ = "http://127.0.0.1:10000/"; + account_name + "/";
-    account_dfs_url_ = "http://127.0.0.1:10000/"; + account_name + "/";
-  } else {
-    account_dfs_url_ = "https://"; + account_name + ".dfs.core.windows.net/";
-    account_blob_url_ = "https://"; + account_name + ".blob.core.windows.net/";
+namespace {
+std::string BuildBaseUrl(const std::string& scheme, const std::string& 
authority,
+                         const std::string& account_name) {
+  std::string url;
+  url += scheme + "://";
+  if (!authority.empty()) {

Review Comment:
   I think that we should reject empty authority because it builds no host part 
URL.



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