-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-54570][PYTHON] Propagate the error class correctly in Spark Connect #53288
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-54570][PYTHON] Propagate the error class correctly in Spark Connect #53288
Conversation
ueshin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
cc @HyukjinKwon @zhengruifeng
|
|
||
| if __name__ == "__main__": | ||
| import unittest | ||
| from pyspark.errors.tests.test_errors import * # noqa: F401 |
There was a problem hiding this comment.
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.
| from pyspark.errors.tests.test_connect_errors_conversion import * # noqa: F401 |
allisonwang-db
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix
…ingyang-db/spark into fix-spark-connect-config-error
| if __name__ == "__main__": | ||
| import unittest | ||
| from pyspark.errors.tests.test_errors import * # noqa: F401 | ||
| from pyspark.errors.tests.test_connect_errors_conversion import * # noqa: F401 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added!
|
|
||
| if __name__ == "__main__": | ||
| import unittest | ||
| from pyspark.errors.tests.test_errors import * # noqa: F401 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me revert it in a follow-up PR to unblock this
|
|
||
| if __name__ == "__main__": | ||
| import unittest | ||
| from pyspark.errors.tests.test_errors import * # noqa: F401 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| from pyspark.errors.tests.test_errors import * # noqa: F401 |
|
merged to master |
What changes were proposed in this pull request?
When
spark.sql.connect.enrichError.enabledis enabled (default),message_parametersis retrieved fromroot_error.spark_throwableand set correctly. However,error_classwas 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