Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-50662][PYTHON][WINDOWS] Escape ampersands in command arguments on windows #49286

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Nassizouz
Copy link

What changes were proposed in this pull request?

Changing java_gateway.py and verious .cmd files so ampersands will be escaped using triple carets (^^^) on windows system

Why are the changes needed?

On windows system, spark-submit is operated by running a chain .cmd files, this flow didn't handled ampersands (&) correctly so in each step, if the arguments that were passed to the next .cmd file/java contained an ampersand, the flags were truncated up to the location of the first ampersand

Does this PR introduce any user-facing change?

Yes
The previous behaviour couldn't handle configs with parameters, and the new one can

How was this patch tested?

This patch was tested on multiple windows machines across the company that work at

Was this patch authored or co-authored using generative AI tooling?

No

@Nassizouz Nassizouz force-pushed the escape-ampersand-on-windows branch from 302f4eb to 0b719a5 Compare December 24, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant