yuhao-su commented on code in PR #3311:
URL: https://github.com/apache/iceberg-rust/pull/3311#discussion_r4148986397
##########
crates/storage/opendal/src/azdls.rs:
##########
@@ -237,6 +236,13 @@ impl AzureStoragePath {
self.endpoint_suffix
)
}
+
+ /// The part of `absolute_path` below the filesystem, without a leading
`/`,
+ /// like the relative paths of the other backends.
+ pub(crate) fn relative_path<'a>(&self, absolute_path: &'a str) -> &'a str {
+ let path = &absolute_path[absolute_path.len() - self.path.len()..];
+ path.strip_prefix('/').unwrap_or(path)
Review Comment:
The slicing is unchanged from `main` (`split_at` in `azdls_create_operator`,
`&path[path.len() - relative_path_len..]` in `relativize_path`); this PR only
moves it into a helper. The mismatch comes from `AzureStoragePath::path` being
`Url::path()`, which is percent-encoded and normalized, so it is not a byte
suffix of the input for paths with non-ASCII characters or `#`. #3163 fixes
that at the source by taking the raw suffix of the input, so I'd rather leave
this to #3163 than add a second fix here.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]