Skip to content

[SPARK-52047][PYTHON] Raise PySparkValueError for unsupported plot kinds #50837

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

Closed
wants to merge 2 commits into from

Conversation

xinrong-meng
Copy link
Member

@xinrong-meng xinrong-meng commented May 8, 2025

What changes were proposed in this pull request?

Raise PySparkValueError for unsupported plot kinds

Why are the changes needed?

Previously, unsupported plot kinds raised a raw KeyError, which was unclear. This change adds explicit validation and raises a descriptive PySparkValueError, improving user experience and debugging clarity.

Does this PR introduce any user-facing change?

Yes, when passing an invalid kind to DataFrame.plot, users now receive a clear PySparkValueError instead of a generic KeyError.

How was this patch tested?

Unit tests.

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

No.

@xinrong-meng xinrong-meng changed the title Raise PySparkValueError for unsupported plot kinds [SPARK-52047][PYTHON] Raise PySparkValueError for unsupported plot kinds May 8, 2025
@xinrong-meng xinrong-meng marked this pull request as ready for review May 9, 2025 00:39
@HyukjinKwon
Copy link
Member

Merged to master.

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.

3 participants