This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 78e9f70dd6e3 [SPARK-54174][CORE][CONNECT][TESTS] Remove override of
deprecated method `SparkThrowable#getErrorClass` in Spark code
78e9f70dd6e3 is described below
commit 78e9f70dd6e3b7e9b0ef164575b5eaea8f7e2ec4
Author: yangjie01 <[email protected]>
AuthorDate: Mon Nov 3 21:36:34 2025 -0800
[SPARK-54174][CORE][CONNECT][TESTS] Remove override of deprecated method
`SparkThrowable#getErrorClass` in Spark code
### What changes were proposed in this pull request?
This pr removes the override of the deprecated method
`SparkThrowable#getErrorClass` from the Spark codebase. Since this method has
been marked as deprecated and is defined as `default String getErrorClass() {
return getCondition(); }`, the overriding behavior for it can be omitted based
on the current code.
### Why are the changes needed?
Code Cleanup
### Does this PR introduce _any_ user-facing change?
No, this only involves test code.
### How was this patch tested?
Pass Github Actions
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #52868 from LuciferYang/cleanup-override-getErrorClass.
Lead-authored-by: yangjie01 <[email protected]>
Co-authored-by: YangJie <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala | 3 ---
.../spark/sql/connect/service/FetchErrorDetailsHandlerSuite.scala | 1 -
2 files changed, 4 deletions(-)
diff --git a/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala
b/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala
index 24a1fa740175..acaef2512648 100644
--- a/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala
+++ b/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala
@@ -620,7 +620,6 @@ class SparkThrowableSuite extends SparkFunSuite {
// Create a custom throwable that overrides getDefaultMessageTemplate.
class CustomTemplatedThrowable extends Throwable with SparkThrowable {
override def getCondition: String = "DIVIDE_BY_ZERO"
- override def getErrorClass: String = "DIVIDE_BY_ZERO"
override def getMessage: String = "Custom message"
override def getMessageParameters: java.util.Map[String, String] =
Map("config" -> "TEST_CONFIG").asJava
@@ -643,7 +642,6 @@ class SparkThrowableSuite extends SparkFunSuite {
// Create a throwable that uses default getDefaultMessageTemplate
implementation.
class ReadFromJSONThrowable extends Throwable with SparkThrowable {
override def getCondition: String = "DIVIDE_BY_ZERO"
- override def getErrorClass: String = "DIVIDE_BY_ZERO"
override def getMessage: String = "Random message"
override def getMessageParameters: java.util.Map[String, String] =
Map("config" -> "TEST_CONFIG").asJava
@@ -665,7 +663,6 @@ class SparkThrowableSuite extends SparkFunSuite {
// Create a throwable with non-existing error condition.
class NonExistingConditionThrowable extends Throwable with SparkThrowable {
override def getCondition: String = "NON_EXISTING_ERROR_CONDITION"
- override def getErrorClass: String = "NON_EXISTING_ERROR_CONDITION"
override def getMessage: String = "Non-existing error message"
override def getMessageParameters: java.util.Map[String, String] =
Map("param" -> "value").asJava
diff --git
a/sql/connect/server/src/test/scala/org/apache/spark/sql/connect/service/FetchErrorDetailsHandlerSuite.scala
b/sql/connect/server/src/test/scala/org/apache/spark/sql/connect/service/FetchErrorDetailsHandlerSuite.scala
index 569ee9737c69..c74dea3418f0 100644
---
a/sql/connect/server/src/test/scala/org/apache/spark/sql/connect/service/FetchErrorDetailsHandlerSuite.scala
+++
b/sql/connect/server/src/test/scala/org/apache/spark/sql/connect/service/FetchErrorDetailsHandlerSuite.scala
@@ -46,7 +46,6 @@ class TestSparkThrowableWithBreakingChange(
with SparkThrowable {
override def getCondition: String = errorClass
- override def getErrorClass: String = errorClass
override def getMessageParameters: java.util.Map[String, String] = {
import scala.jdk.CollectionConverters._
messageParams.asJava
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]