Skip to content

Conversation

@shujingyang-db
Copy link
Contributor

What changes were proposed in this pull request?

When spark.sql.connect.enrichError.enabled is enabled (default), message_parameters is retrieved from root_error.spark_throwable and set correctly. However, error_class was not being retrieved/set in the same way, causing the error class information to be lost on the PySpark Connect client side. This PR fixes it by propagating the error class correctly.

Why are the changes needed?

Fix a bug.

Does this PR introduce any user-facing change?

No

How was this patch tested?

New unit tests.

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

Yes

@github-actions github-actions bot added the PYTHON label Dec 2, 2025
@shujingyang-db shujingyang-db changed the title [SPARK-54570] Propagate the error class correctly in Spark Connect [SPARK-54570][PYTHON] Propagate the error class correctly in Spark Connect Dec 2, 2025
Copy link
Member

@ueshin ueshin left a comment

Choose a reason for hiding this comment

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


if __name__ == "__main__":
import unittest
from pyspark.errors.tests.test_errors import * # noqa: F401
Copy link
Contributor

Choose a reason for hiding this comment

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

@shujingyang-db I guess this test file is never tests before.

Suggested change
from pyspark.errors.tests.test_connect_errors_conversion import * # noqa: F401

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants