diff --git a/object_store/src/parse.rs b/object_store/src/parse.rs index 51993e245530..67f94187c4e0 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") { @@ -240,6 +243,30 @@ mod tests { ), ("http://mydomain/path", (ObjectStoreScheme::Http, "path")), ("https://mydomain/path", (ObjectStoreScheme::Http, "path")), + ( + "abfss://file_system@account.dfs.fabric.microsoft.com/", + (ObjectStoreScheme::MicrosoftAzure, ""), + ), + ( + "abfss://file_system@account.dfs.fabric.microsoft.com/", + (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 {