fix: Handle absolute paths in Delta log file listing (#907) - #932
Merged
vinishjail97 merged 3 commits intoSep 26, 2026
Merged
Conversation
1 task
vinishjail97
reviewed
Sep 8, 2026
Contributor
There was a problem hiding this comment.
Thanks for picking this up and your first set of contributions @zhang-arvin, added a minor comment. Please fix the PR title check to include the prefix "fix:"
vinishjail97
approved these changes
Sep 25, 2026
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.
Closes #907
Description
The Delta protocol (PROTOCOL.md, Add File and Remove File actions) allows a data file path to be relative to the table root or absolute. XTable's delta sources always assume relative paths and concatenate the table base path onto the logged path when it does not lexically start with the base, producing locations like
s3a://bucket/tab/s3://bucket/tab/part-0.parquet. The resulting manifest entries carryrecord_count=0and are pruned during scan planning, so the sync reports success while silently dropping rows from the converted table.Root cause
DeltaActionsConverter.getFullPathToFileandDeltaKernelActionsConverter.getFullPathToFileuseString.startsWithprefix matching to decide whether the logged path is already resolved. Any absolute path not lexically under the table base (a scheme alias such ass3://against ans3a://base, a same-scheme different-bucket/container location, or afile://URI) fails the prefix test and is treated as relative, mangling the location.Changes
DeltaActionsConverter.getFullPathToFile: use the logged path as-is when it is absolute. A path is absolute when it has a URI scheme (e.g.s3://,s3a://,hdfs://,file://,abfss://,gs://) or starts with/.DeltaKernelActionsConverter.getFullPathToFile: same fix for the Delta Kernel source path.file://URIs.With the fix, all of the failure cases from the issue resolve correctly:
s3a://bucket/tabpart-0.parquets3a://bucket/tab/part-0.parquets3a://bucket/tabs3a://bucket/tab/part-0.parquets3a://bucket/tabs3://bucket/tab/part-0.parquets3a://bucket/tabs3://other-bucket/x/part-0.parquets3a://bucket/tabfile:///local/t/part-0.parquetValidation
./mvnw -pl xtable-core -am -Dtest=TestDeltaActionsConverter -DfailIfNoTests=false -DskipITs test— 6 tests, all passing./mvnw spotless:check -pl xtable-core— passing