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-38700][SQL][3.3] Use error classes in the execution errors of save mode #36676
Conversation
Can one of the admins verify this patch? |
@panbingkun Could you resolve conflicts, please. |
sorry, I've been busy for the last two weeks, i will do it the weekend. |
ping @MaxGekk, I have finished it |
val (displayClass, displayMessageParameters, displayFormat) = if (errorInfo.subClass.isEmpty) { | ||
(errorClass, messageParameters, errorInfo.messageFormat) | ||
} else { | ||
val subClass = errorInfo.subClass.get | ||
val subErrorClass = messageParameters.head | ||
val errorSubInfo = subClass.getOrElse(subErrorClass, | ||
throw new IllegalArgumentException(s"Cannot find sub error class '$subErrorClass'")) | ||
(errorClass + "." + subErrorClass, messageParameters.tail, | ||
errorInfo.messageFormat + " " + errorSubInfo.messageFormat) | ||
} | ||
val displayMessage = String.format( | ||
displayFormat.replaceAll("<[a-zA-Z0-9_-]+>", "%s"), | ||
displayMessageParameters : _*) | ||
val displayQueryContext = if (queryContext.isEmpty) { |
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.
Could you not include the changes into the PR. If you you changes strongly require them, let's don't backport 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.
ok, i will close it and open new pr for it!
new pr: #36852
What changes were proposed in this pull request?
Migrate the following errors in QueryExecutionErrors:
Why are the changes needed?
Porting execution errors of unsupported saveMode to new error framework.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Add new UT.