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-38700][SQL][3.3] Use error classes in the execution errors of save mode #36676

Closed

Conversation

panbingkun
Copy link
Contributor

What changes were proposed in this pull request?

Migrate the following errors in QueryExecutionErrors:

  • unsupportedSaveModeError -> UNSUPPORTED_SAVE_MODE

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.

@panbingkun
Copy link
Contributor Author

master branch pr: #36350
@MaxGekk ping

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@MaxGekk
Copy link
Member

MaxGekk commented May 27, 2022

@panbingkun Could you resolve conflicts, please.

@panbingkun
Copy link
Contributor Author

@panbingkun Could you resolve conflicts, please.

sorry, I've been busy for the last two weeks, i will do it the weekend.

@panbingkun
Copy link
Contributor Author

ping @MaxGekk, I have finished it

Comment on lines +80 to 93
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) {
Copy link
Member

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.

Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants