yuhao-su opened a new pull request, #3311:
URL: https://github.com/apache/iceberg-rust/pull/3311
## Which issue does this PR close?
- None. Found while testing against a real ADLS Gen2 account.
## What changes are included in this PR?
ADLS relative paths kept the leading `/` of the URL path (`/dir/file`),
unlike the other backends. OpenDAL's `Operator` methods strip it, but its
`Deleter` does not, so `FileIO::delete_stream` sends `DELETE
<endpoint>/<filesystem>//dir/file` and ADLS answers 400 `InvalidUri`; debug
builds panic on OpenDAL's `debug_assert!(!path.starts_with('/'))` instead.
`drop_table_data`, used by `purge_table` in the memory, SQL, Glue, and HMS
catalogs, therefore fails on ADLS.
`AzureStoragePath::relative_path` now returns the path without the leading
`/`, and both `azdls_create_operator` and `relativize_path` use it.
Related:
- apache/opendal#8352 makes OpenDAL's `Deleter` normalize paths. This change
does not depend on it.
- #3163 changes how `AzureStoragePath::path` is derived and adds test cases
that expect the leading `/`, so whichever lands second needs a small update.
## Are these changes tested?
Unit tests: updated the relative-path expectations in
`test_azdls_create_operator` and `test_relativize_path_azdls`, and added a
filesystem-root case. There is no ADLS integration test in this repo. The same
change was verified in a downstream fork against a real ADLS Gen2 account:
`delete_stream` returned 400 `InvalidUri` before it and succeeded after it.
## AI Disclosure
Written with AI assistance (Claude Code). I reviewed the change and the test
results above.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]