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

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


The following commit(s) were added to refs/heads/master by this push:
     new ab53d2dd5f Support onelake fabric paths in parse_url (#5000) (#5002)
ab53d2dd5f is described below

commit ab53d2dd5fb2af2bab69f95a6ddae2226c166500
Author: Raphael Taylor-Davies <[email protected]>
AuthorDate: Thu Nov 2 10:28:07 2023 +0000

    Support onelake fabric paths in parse_url (#5000) (#5002)
---
 object_store/src/parse.rs | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/object_store/src/parse.rs b/object_store/src/parse.rs
index 0fbc33c935..ddea034699 100644
--- a/object_store/src/parse.rs
+++ b/object_store/src/parse.rs
@@ -81,7 +81,10 @@ impl ObjectStoreScheme {
             }
             ("http", Some(_)) => (Self::Http, url.path()),
             ("https", Some(host)) => {
-                if host.ends_with("dfs.core.windows.net") || 
host.ends_with("blob.core.windows.net")
+                if host.ends_with("dfs.core.windows.net")
+                    || host.ends_with("blob.core.windows.net")
+                    || host.ends_with("dfs.fabric.microsoft.com")
+                    || host.ends_with("blob.fabric.microsoft.com")
                 {
                     (Self::MicrosoftAzure, url.path())
                 } else if host.ends_with("amazonaws.com") {
@@ -251,6 +254,30 @@ mod tests {
                 "file:///bar%252Efoo",
                 (ObjectStoreScheme::Local, "bar%2Efoo"),
             ),
+            (
+                "abfss://[email protected]/",
+                (ObjectStoreScheme::MicrosoftAzure, ""),
+            ),
+            (
+                "abfss://[email protected]/",
+                (ObjectStoreScheme::MicrosoftAzure, ""),
+            ),
+            (
+                "https://account.dfs.fabric.microsoft.com/";,
+                (ObjectStoreScheme::MicrosoftAzure, ""),
+            ),
+            (
+                "https://account.dfs.fabric.microsoft.com/container";,
+                (ObjectStoreScheme::MicrosoftAzure, "container"),
+            ),
+            (
+                "https://account.blob.fabric.microsoft.com/";,
+                (ObjectStoreScheme::MicrosoftAzure, ""),
+            ),
+            (
+                "https://account.blob.fabric.microsoft.com/container";,
+                (ObjectStoreScheme::MicrosoftAzure, "container"),
+            ),
         ];
 
         for (s, (expected_scheme, expected_path)) in cases {

Reply via email to