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


##########
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:
   My reasoning here is that there are many validations I could apply, but the 
most complete validation will come from the error messages triggered by using 
the filesystem with a bogus URL with 3 slashes after `https:`.



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