cloud-fan commented on a change in pull request #33164:
URL: https://github.com/apache/spark/pull/33164#discussion_r665570751



##########
File path: core/src/main/scala/org/apache/spark/SparkException.scala
##########
@@ -69,12 +73,11 @@ private[spark] class SparkUpgradeException(version: String, 
message: String, cau
 /**
  * Arithmetic exception thrown from Spark with an error class.
  */
-class SparkArithmeticException(
-    val errorClass: Option[String],
-    val messageParameters: Seq[String])
-  extends ArithmeticException(SparkError.getMessage(errorClass.get, 
messageParameters))
-    with SparkError {
+class SparkArithmeticException(errorClass: String, messageParameters: 
Array[String])
+  extends ArithmeticException(SparkThrowableHelper.getMessage(errorClass, 
messageParameters))
+    with SparkThrowable {
 
-  def this(errorClass: String, messageParameters: Seq[String]) =
-    this(errorClass = Some(errorClass), messageParameters = messageParameters)
+  override def getErrorClass: String = errorClass
+  override def getMessageParameters: Array[String] = messageParameters

Review comment:
       It seems like we are totally fine if `SparkThrowable` does not have 
`getMessageParameters`. I think the message parameter is an internal thing and 
we shouldn't expose it to the end-users via a public API.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to