Skip to content

Commit

Permalink
[SPARK-43255][SQL] Replace the error class _LEGACY_ERROR_TEMP_2020 by…
Browse files Browse the repository at this point in the history
… an internal error

### What changes were proposed in this pull request?

Change the error class_LEGACY_ERROR_TEMP_2022 to internal error as it cannot be accessed by public API.

### Why are the changes needed?

User experience improvement

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Tests already exist.

### Was this patch authored or co-authored using generative AI tooling?

No

Closes apache#45302 from JinHelin404/SPARK-43255.

Authored-by: JineHelin404 <[email protected]>
Signed-off-by: Max Gekk <[email protected]>
  • Loading branch information
JinHelin404 authored and MaxGekk committed Mar 1, 2024
1 parent a993f9d commit a5a2822
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
5 changes: 0 additions & 5 deletions common/utils/src/main/resources/error/error-classes.json
Original file line number Diff line number Diff line change
Expand Up @@ -5718,11 +5718,6 @@
"not resolved."
]
},
"_LEGACY_ERROR_TEMP_2020" : {
"message" : [
"Couldn't find a valid constructor on <cls>."
]
},
"_LEGACY_ERROR_TEMP_2023" : {
"message" : [
"Unresolved encoder expected, but <attr> was found."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,9 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase with ExecutionE
s"${argClasses.mkString("(", ", ", ")")} on $cls.")
}

def constructorNotFoundError(cls: String): SparkRuntimeException = {
new SparkRuntimeException(
errorClass = "_LEGACY_ERROR_TEMP_2020",
messageParameters = Map("cls" -> cls))
def constructorNotFoundError(cls: String): SparkException = {
SparkException.internalError(
s"Couldn't find a valid constructor on <$cls>.")
}

def unsupportedNaturalJoinTypeError(joinType: JoinType): SparkException = {
Expand Down

0 comments on commit a5a2822

Please sign in to comment.