Repository navigation
Fix ADLSFileIO listPrefix FileInfo location. - #18400
Open
tom-s-powell wants to merge 1 commit into
Open
tom-s-powell wants to merge 1 commit into
tom-s-powell wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SupportsPrefixOperations.listPrefixis a generic API whose callers feed eachFileInfo.location()straight back into aFileIO(or use it to compare against Iceberg metadata locations). The two other cloud implementations honour this contract by returning fully-qualified URIs:S3FileIO.listPrefix→s3://bucket/keyGCSFileIO.listPrefix→gs://bucket/blobADLSFileIO.listPrefix, however, was returning the rawPathItem.getName()from the Azure SDK, which is only the container-relative path (e.g. dir/file). That means the location it emits:ADLSLocation(its regex requires an abfs[s]/wasb[s] scheme, so anything passed back throughnewInputFile/deleteFilethrows aValidationException),deletePrefixthe way S3/GCS are,FileSystemWalker.listDirRecursivelyWithFileIOand downstream actions likeDeleteOrphanFilesSparkAction/RemoveOrphanFilesProcedure, which rely onFileInfo.location()being a usable location string.What changed
ADLSLocationnow captures and exposes the URI scheme (abfs, abfss, wasb, wasbs) so it can be reconstituted on the way out.ADLSFileIO.listPrefixreconstructs a fully-qualified URI (<scheme>://<container>@<host>/<path>, or<scheme>://<host>/<path>when no container is present) from the input prefix's scheme/host/container and thePathItemname, bringing it in line withS3FileIOandGCSFileIO.ADLSLocation#scheme().Compatibility
This is a behaviour change for any caller that was relying on the previous container-relative return value. Given the existing behaviour was inconsistent with the interface contract and with every other
DelegateFileIOimplementation - and would break in-tree callers such as orphan-file cleanup on ADLS - this is a bug fix rather than a semantic break.