Repository navigation
Fix polaris catalog with azure - #100583
Conversation
|
Workflow [PR], commit [c37c6d7] Summary: ❌
AI ReviewSummaryThis PR adds Polaris-style ABFSS path normalization for DataLake and wires it through Findings
Tests
ClickHouse Rules
Final Verdict
|
| strip_container(data_location); | ||
|
|
||
| if (!endpoint.empty() && metadata_location.starts_with(azure_host_prefix)) | ||
| metadata_location = "/" + bucket + "/" + metadata_location.substr(azure_host_prefix.size()); |
There was a problem hiding this comment.
getMetadataLocation can still return a non-relative path when endpoint has a trailing slash (e.g. https://account.dfs.core.windows.net/).
Concrete trace:
data_location = getLocation()->https://account.dfs.core.windows.net/mycontainer/actual/path/- stripping by
endpoint(with trailing slash) producesdata_location = "mycontainer/actual/path/"(no leading/) - this branch converts
metadata_locationto"/mycontainer/actual/path/..."(with leading/) starts_with(data_location)then fails, so the function returns a host-qualified/non-relative path instead ofmetadata/v1.metadata.json.
Please normalize leading-slash handling consistently for both strings (or normalize endpoint once and always strip to the same shape).
arsenmuk
left a comment
There was a problem hiding this comment.
Also there a typo in the description of PR: to add bucket at the begging of the path
begging -> beginning
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix polaris catalog with azure. Since 25.12 this catalog with azure started to add bucket at the beginning of the path. For example
abfss://polaris-polaris@<some_url>.windows.net/polaris-polaris/<other-path>instead ofabfss://polaris-polaris@<some_url>.windows.net/<other-path>. This PR cuts bucket in the pathDocumentation entry for user-facing changes
Version info
26.4.1.708