[SPARK-50395][SQL] Fix malformed URI syntax in Windows #48934
Closed
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.
What changes were proposed in this pull request?
This PR fixes an issue that the Artifact Manager is using a malformed URI string for Class Dir in windows. The issue is caused by using a platform-specific
File.separator
instead of/
: Windows's file separator is\
, which results in a wrong URI string:This failure is captured by the scheduled Windows build on
master
, such as https://github.com/apache/spark/actions/runs/11958030827.To fix this issue we just make sure that the separator is always
/
on all OSes.Why are the changes needed?
Fix a compilation failure in Windows.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Tested on my own fork with a modified Workflow that runs on PR: xupefei#1, https://github.com/xupefei/spark/actions/runs/11970330735/job/33372836765?pr=1
Was this patch authored or co-authored using generative AI tooling?
No.