-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-48585][SQL] Make built-in JdbcDialect's method classifyException throw out the original exception
#46937
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
Changes from 2 commits
a4b01b0
0f046cb
b800002
eb5ba34
49f23df
812d5da
77f2aea
a05e3f8
fc8a54a
59d40c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -740,15 +740,16 @@ abstract class JdbcDialect extends Serializable with Logging { | |
| * @param e The dialect specific exception. | ||
| * @param errorClass The error class assigned in the case of an unclassified `e` | ||
| * @param messageParameters The message parameters of `errorClass` | ||
| * @param description The error description | ||
| * @return `AnalysisException` or its sub-class. | ||
| */ | ||
| def classifyException( | ||
| e: Throwable, | ||
| errorClass: String, | ||
| messageParameters: Map[String, String], | ||
| description: String): AnalysisException = { | ||
| classifyException(description, e) | ||
| messageParameters: Map[String, String]): AnalysisException = { | ||
| new AnalysisException( | ||
|
||
| errorClass = errorClass, | ||
| messageParameters = messageParameters, | ||
| cause = Some(e)) | ||
| } | ||
|
|
||
| /** | ||
|
|
||
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 the code logic, it seems that there is no need for the field
descriptionto exist. Let's remove it.Although
JdbcDialectis marked asDeveloperApi, this method has been added fromSpark version 4.0and the version4.0has not been released yet.Can we directly remove it?
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.
I think there was a reason to call the legacy
classifyExceptionmethod here. Can we dig into it?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.
I am investigating history.
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.
This guarantees pre-implemented legacy
classifyExceptions from third-party to be correctly calledThere 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.
Yeah, that's right, see PR below:

1.#44358, the modification of this PR resulted in
break changes, and with the suggestion ofcloud-fan:the following PR has been created.
2.#44449, this PR has restored compatibility behavior
