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

   ### What changes were proposed in this pull request?
   In the PR, I propose to catch `java.lang.IllegalStateException` and 
`java.lang.AssertionError` (raised by asserts), and wrap them by Spark's 
exception w/ the `INTERNAL_ERROR` error class. The modification affects only 
actions so far.
   
   This PR affects the case of missing bucket file. After the changes, Spark 
throws `SparkException` w/ `INTERNAL_ERROR` instead of `IllegalStateException`. 
Since this is not Spark's illegal state, the exception should be replaced by 
another runtime exception. Created the ticket SPARK-39163 to fix this.
   
   This is a backport of https://github.com/apache/spark/pull/36500.
   
   ### Why are the changes needed?
   To improve user experience with Spark SQL and unify representation of 
internal errors by using error classes like for other errors. Usually, users 
shouldn't observe asserts and illegal states, but even if such situation 
happens, they should see errors in the same way as other errors (w/ error class 
`INTERNAL_ERROR`).
   
   ### Does this PR introduce _any_ user-facing change?
   Yes. At least, in one particular case, see the modified test suites and 
SPARK-39163.
   
   ### How was this patch tested?
   By running the affected test suites:
   ```
   $ build/sbt "test:testOnly *.BucketedReadWithoutHiveSupportSuite"
   $ build/sbt "test:testOnly *.AdaptiveQueryExecSuite"
   $ build/sbt "test:testOnly *.WholeStageCodegenSuite"
   ```
   
   Authored-by: Max Gekk <[email protected]>
   Signed-off-by: Max Gekk <[email protected]>
   (cherry picked from commit f5c3f0c228fef7808d1f927e134595ddd4d31723)
   Signed-off-by: Max Gekk <[email protected]>


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