This is an automated email from the ASF dual-hosted git repository.

tustvold pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs-object-store.git


The following commit(s) were added to refs/heads/main by this push:
     new 87f0b8d  feat (azure): support for account in 'az://' URLs (#403)
87f0b8d is described below

commit 87f0b8d50b021b4235c40cbcd326fa4fc8d06b24
Author: ByteBaker <[email protected]>
AuthorDate: Wed Jul 9 03:16:53 2025 +0530

    feat (azure): support for account in 'az://' URLs (#403)
---
 src/azure/builder.rs | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/azure/builder.rs b/src/azure/builder.rs
index e97e83e..182bdf0 100644
--- a/src/azure/builder.rs
+++ b/src/azure/builder.rs
@@ -658,8 +658,8 @@ impl MicrosoftAzureBuilder {
         };
 
         match parsed.scheme() {
-            "az" | "adl" | "azure" => self.container_name = 
Some(validate(host)?),
-            "abfs" | "abfss" => {
+            "adl" | "azure" => self.container_name = Some(validate(host)?),
+            "az" | "abfs" | "abfss" => {
                 // abfs(s) might refer to the fsspec convention 
abfs://<container>/<path>
                 // or the convention for the hadoop driver 
abfs[s]://<file_system>@<account_name>.dfs.core.windows.net/<path>
                 if parsed.username().is_empty() {
@@ -1103,6 +1103,14 @@ mod tests {
         assert_eq!(builder.container_name, Some("file_system".to_string()));
         assert!(!builder.use_fabric_endpoint.get().unwrap());
 
+        let mut builder = MicrosoftAzureBuilder::new();
+        builder
+            
.parse_url("az://[email protected]/path-part/file")
+            .unwrap();
+        assert_eq!(builder.account_name, Some("account".to_string()));
+        assert_eq!(builder.container_name, Some("container".to_string()));
+        assert!(!builder.use_fabric_endpoint.get().unwrap());
+
         let mut builder = MicrosoftAzureBuilder::new();
         builder
             .parse_url("abfss://[email protected]/")

Reply via email to