Skip to content

Azure: Return fully-qualified locations from ADLSFileIO.listPrefix#17248

Draft
thswlsqls wants to merge 1 commit into
apache:mainfrom
thswlsqls:fix/adls-listprefix-return-full-uri
Draft

Azure: Return fully-qualified locations from ADLSFileIO.listPrefix#17248
thswlsqls wants to merge 1 commit into
apache:mainfrom
thswlsqls:fix/adls-listprefix-return-full-uri

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Closes #17247

Summary

  • ADLSFileIO.listPrefix() returned each file's location as a container-relative path (dir/file) instead of a fully-qualified URI.
  • Siblings return full URIs: S3FileIO builds s3://bucket/key (S3FileIO.java:348), GCSFileIO builds gs://bucket/name (GCSFileIO.java:302).
  • ADLSLocation cannot parse a relative path, so it throws ValidationException when FileSystemWalker round-trips it (opt-in Spark usePrefixListing, Flink maintenance orphan cleanup).
  • Reconstruct the full URI from the prefix location, preserving its scheme, container, and host; add ADLSLocation.scheme() to expose the captured scheme.

Testing done

  • Added TestADLSFileIO#listPrefixReturnsFullyQualifiedLocation (unit, Mockito) asserting the location is abfss://container@account.dfs.core.windows.net/dir/file.
  • ./gradlew :iceberg-azure:test --tests "...TestADLSFileIO" — 13 tests passed. :iceberg-azure:spotlessCheck :iceberg-azure:checkstyleMain :iceberg-azure:checkstyleTest — passed.
  • Updated the existing src/integration/.../TestADLSFileIO#testListPrefixOperations assertion to the full URI. Not run locally, along with :iceberg-azure:check, since both need Docker/Azurite.

ADLSFileIO.listPrefix returned each file's location as a path relative to
the filesystem container root (e.g. "dir/file"), while the sibling S3FileIO
and GCSFileIO return fully-qualified URIs. The relative path cannot be fed
back into ADLSLocation, so it fails validation when round-tripped through
FileSystemWalker (used by opt-in prefix-based orphan file cleanup).

Reconstruct the full URI from the prefix location, preserving its scheme,
container, and host. Add ADLSLocation.scheme() to expose the captured scheme.

Generated-by: Claude Code
@github-actions github-actions Bot added the AZURE label Jul 16, 2026
@thswlsqls
thswlsqls marked this pull request as draft July 17, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure: ADLSFileIO.listPrefix returns relative paths instead of fully-qualified URIs

1 participant