Skip to content

Commit

Permalink
[SPARK-49937][INFRA] Ban call the method SparkThrowable#getErrorClass
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
The pr aims to ban call the method `SparkThrowable#getErrorClass`.

### Why are the changes needed?
After PR #48196, `SparkThrowable#getErrorClass` has been marked as `Deprecated`. In order to prevent future developers from calling `SparkThrowable#getErrorClass` again, which may require continuous fix and migration, calling `SparkThrowable#getErrorClass` is strictly prohibited as it will fail at the compilation level.

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

### How was this patch tested?
- Pass GA.
- Manually test.

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

Closes #48426 from panbingkun/SPARK-49937.

Authored-by: panbingkun <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
  • Loading branch information
panbingkun authored and HyukjinKwon committed Oct 12, 2024
1 parent 1244c5a commit ed4847f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3075,6 +3075,10 @@
reduce the cost of migration in subsequent versions.
-->
<arg>-Wconf:cat=deprecation&amp;msg=it will become a keyword in Scala 3:e</arg>
<!--
SPARK-49937 ban call the method `SparkThrowable#getErrorClass`
-->
<arg>-Wconf:cat=deprecation&amp;msg=method getErrorClass in trait SparkThrowable is deprecated:e</arg>
</args>
<jvmArgs>
<jvmArg>-Xss128m</jvmArg>
Expand Down
4 changes: 3 additions & 1 deletion project/SparkBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ object SparkBuild extends PomBuild {
// reduce the cost of migration in subsequent versions.
"-Wconf:cat=deprecation&msg=it will become a keyword in Scala 3:e",
// SPARK-46938 to prevent enum scan on pmml-model, under spark-mllib module.
"-Wconf:cat=other&site=org.dmg.pmml.*:w"
"-Wconf:cat=other&site=org.dmg.pmml.*:w",
// SPARK-49937 ban call the method `SparkThrowable#getErrorClass`
"-Wconf:cat=deprecation&msg=method getErrorClass in trait SparkThrowable is deprecated:e"
)
}
)
Expand Down

0 comments on commit ed4847f

Please sign in to comment.