LielBach opened a new pull request #31238: URL: https://github.com/apache/spark/pull/31238
### What changes were proposed in this pull request? (1) Adds more refined pyspark exceptions. (2) Suggests a new ordering for exceptions in the project - Each module has its exceptions in a corresponding exceptions.py. For example the core module has its own exeptions.py (under pyspark/exceptions.py) seperated from the sql module's exceptions.py (under pyspark/sql/exceptions.py). ### Why are the changes needed? (1) Needed for enabling users a better handling of various error scenarios and for clarity. (2) Enables a more clean way of managing the various exceptions and in each module and also allows for sharing a common exceptions between python files in the same module without risking circular dependencies. ### Does this PR introduce _any_ user-facing change? pe of exceptions thrown will be more refined and accurate, exception messages remaine unchanged and exceptions inherit from their former class of exception (be it Exception or RuntimeError) for backwards compatability. ### How was this patch tested? Tests are passing and tested manually that the right exception type is thrown in the various scenarios along with the appropriate exception messages. In order to fully automate the tests cleanly it's required to implement the same conversion mechanism found in CapturedException but I find it beyond the scope of this PR. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
