itholic opened a new pull request, #39591:
URL: https://github.com/apache/spark/pull/39591

   ### What changes were proposed in this pull request?
   
   This PR proposes to migrate errors thrown by JVM into `PySparkException`.
   
   
   ### Why are the changes needed?
   
   Because the errors thrown by JVM side (e.g. `AnalysisException`, 
`ParseException `, `IllegalArgumentException ` ... ) are managed by 
`pyspark/sql/utils.py` which is not very correct place to handle the PySpark 
errors so far.
   
   Now we have separate error package `pyspark.errors` which is introduced from 
https://github.com/apache/spark/pull/39387, we should centralize whole errors 
generated by PySpark side into single management point.
   
   So, here I suggest that all errors occurring in the JVM inherit 
PySparkException so that errors can be managed consistently.
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   No, this PR suggests to improve an internal error handling structure without 
any user-facing change.
   
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some 
test cases that check the changes thoroughly including negative and positive 
cases if possible.
   If it was tested in a way different from regular unit tests, please clarify 
how you tested step by step, ideally copy and paste-able, so that other 
reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why 
it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions 
for the consistent environment, and the instructions could accord to: 
https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   
   The existing CI should pass.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to