Skip to content
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-39346][SQL][3.3] Convert asserts/illegal state exception to internal errors on each phase #36742

Conversation

MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Jun 1, 2022

What changes were proposed in this pull request?

In the PR, I propose to catch asserts/illegal state exception on each phase of query execution: ANALYSIS, OPTIMIZATION, PLANNING, and convert them to a SparkException w/ the INTERNAL_ERROR error class.

This is a backport of #36704.

Why are the changes needed?

To improve user experience with Spark SQL and unify representation of user-facing errors.

Does this PR introduce any user-facing change?

No. The changes might affect users in corner cases only.

How was this patch tested?

By running the affected test suites:

$ build/sbt "test:testOnly *KafkaMicroBatchV1SourceSuite"
$ build/sbt "test:testOnly *KafkaMicroBatchV2SourceSuite"

Authored-by: Max Gekk max.gekk@gmail.com
Signed-off-by: Max Gekk max.gekk@gmail.com
(cherry picked from commit 8894e78)
Signed-off-by: Max Gekk max.gekk@gmail.com

…l errors on each phase

In the PR, I propose to catch asserts/illegal state exception on each phase of query execution: ANALYSIS, OPTIMIZATION, PLANNING, and convert them to a SparkException w/ the `INTERNAL_ERROR` error class.

To improve user experience with Spark SQL and unify representation of user-facing errors.

No. The changes might affect users in corner cases only.

By running the affected test suites:
```
$ build/sbt "test:testOnly *KafkaMicroBatchV1SourceSuite"
$ build/sbt "test:testOnly *KafkaMicroBatchV2SourceSuite"
```

Closes apache#36704 from MaxGekk/wrapby-INTERNAL_ERROR-every-phase.

Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
(cherry picked from commit 8894e78)
Signed-off-by: Max Gekk <max.gekk@gmail.com>
@MaxGekk
Copy link
Member Author

MaxGekk commented Jun 2, 2022

@HyukjinKwon @cloud-fan @gengliangwang Could you approve the backport, please.

@MaxGekk
Copy link
Member Author

MaxGekk commented Jun 2, 2022

Merging to 3.3. Thank you, @HyukjinKwon and @cloud-fan for review.

MaxGekk added a commit that referenced this pull request Jun 2, 2022
…ternal errors on each phase

### What changes were proposed in this pull request?
In the PR, I propose to catch asserts/illegal state exception on each phase of query execution: ANALYSIS, OPTIMIZATION, PLANNING, and convert them to a SparkException w/ the `INTERNAL_ERROR` error class.

This is a backport of #36704.

### Why are the changes needed?
To improve user experience with Spark SQL and unify representation of user-facing errors.

### Does this PR introduce _any_ user-facing change?
No. The changes might affect users in corner cases only.

### How was this patch tested?
By running the affected test suites:
```
$ build/sbt "test:testOnly *KafkaMicroBatchV1SourceSuite"
$ build/sbt "test:testOnly *KafkaMicroBatchV2SourceSuite"
```

Authored-by: Max Gekk <max.gekkgmail.com>
Signed-off-by: Max Gekk <max.gekkgmail.com>
(cherry picked from commit 8894e78)
Signed-off-by: Max Gekk <max.gekkgmail.com>

Closes #36742 from MaxGekk/wrapby-INTERNAL_ERROR-every-phase-3.3.

Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
@MaxGekk MaxGekk closed this Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants