Skip to content

Conversation

@nemanja-boric-databricks
Copy link
Contributor

What changes were proposed in this pull request?

Currently if there's any gRPC exception, instead of just handling it, the PySpark's gRPC error handler is going to print it out to the stderr, not allowing the user to cleanly ignore the exception by using try/except control flow statement.

In this PR we are removing the logger.exception call and we rely on the downstream exception mechanism to report this to the user.

Why are the changes needed?

Without this change, there's no way that the user ignores the gRPC error without piping the stderr to /dev/null or equivalent.

Does this PR introduce any user-facing change?

Yes, the stderr will not have the exception trace written twice.

How was this patch tested?

Existing tests.

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

No.

Currently if there's any gRPC exception, instead of just handling it, the PySpark's gRPC error handler is going to print
it out to the stderr, not allowing the user to cleanly ignore the exception by using try/except control flow statement.

In this PR we are removing the logger.exception call and we rely on the downstream exception mechanism to report this to
the user.
Copy link
Contributor

@allisonwang-db allisonwang-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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