10BC0 [MINOR] Raise exception if no active Spark context by amarvin · Pull Request #54036 · apache/spark · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@amarvin
Copy link
@amarvin amarvin commented Jan 28, 2026

Replace generic AssertionError with pyspark-specific PySparkException for missing Spark context.

What changes were proposed in this pull request?

Raise a pyspark-specific error when trying to use a pyspark function without an active Spark context.

Why are the changes needed?

The current error message is a generic Python AssertionError.

Does this PR introduce any user-facing change?

A better pyspark-specific error when trying to use a pyspark function without an active Spark context.

How was this patch tested?

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

No.

Replace generic `AssertionError` with pyspark-specific `PySparkException` for missing Spark context.
@github-actions
Copy link

⚠️ Pull Request Title Validation

This pull request title does not contain a JIRA issue ID.

Please update the title to either:

  • Include a JIRA ID: [SPARK-12345] Your description
  • Mark as minor change: [MINOR] Your description

For minor changes that don't require a JIRA ticket (e.g., typo fixes), please prefix the title with [MINOR].


This comment was automatically generated by GitHub Actions

@amarvin amarvin changed the title Raise exception if no active Spark context [minor] Raise exception if no active Spark context Jan 28, 2026
@amarvin amarvin changed the title [minor] Raise exception if no active Spark context [MINOR] Raise exception if no active Spark context Jan 28, 2026
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

0