-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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-45573][SQL] Assign name to the error _LEGACY_ERROR_TEMP_2153 #43414
Conversation
@@ -3015,6 +3015,12 @@ | |||
], | |||
"sqlState" : "4274K" | |||
}, | |||
"UNEXPECTED_SERIALIZER_FOR_CLASS" : { | |||
"message" : [ | |||
"Class <clsName> has unexpected serializer: <objSerializer>." |
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.
"Class <clsName> has unexpected serializer: <objSerializer>." | |
"The class <className> has an unexpected expression serializer. Expects \"STRUCT\" or \"IF\" which returns \"STRUCT\" but found <expr>." |
@@ -1362,7 +1362,7 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase with ExecutionE | |||
def classHasUnexpectedSerializerError( | |||
clsName: String, objSerializer: Expression): SparkRuntimeException = { | |||
new SparkRuntimeException( | |||
errorClass = "_LEGACY_ERROR_TEMP_2153", | |||
errorClass = "UNEXPECTED_SERIALIZER_FOR_CLASS", | |||
messageParameters = Map( | |||
"clsName" -> clsName, | |||
"objSerializer" -> objSerializer.toString())) |
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 quote the expression by toSQLExpr
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.
Waiting for CI.
Thank you @MaxGekk for your review, the CI attempt-2 seems fine and some failures of attempt-1 is unrelated. |
+1, LGTM. Merging to master. |
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.
LGTM later.
@dengziming Please, correct the JIRA to vhttps://issues.apache.org/jira/browse/SPARK-45573 |
What changes were proposed in this pull request?
Assign the name
UNEXPECTED_SERIALIZER_FOR_CLASS
to the legacy error class_LEGACY_ERROR_TEMP_2153
.Why are the changes needed?
To assign proper name as a part of activity in SPARK-37935.
Does this PR introduce any user-facing change?
Yes, the error message will include the error class name
How was this patch tested?
Add a unit test to produce the error from user code.
Was this patch authored or co-authored using generative AI tooling?
No.