MaxGekk commented on code in PR #37834:
URL: https://github.com/apache/spark/pull/37834#discussion_r968274228


##########
core/src/main/scala/org/apache/spark/SparkException.scala:
##########
@@ -269,48 +305,39 @@ private[spark] class SparkFileNotFoundException(
 private[spark] class SparkNumberFormatException(
     errorClass: String,
     errorSubClass: Option[String] = None,
-    messageParameters: Array[String],
+    messageParameters: Map[String, String],
     context: Array[QueryContext],
     summary: String)
   extends NumberFormatException(
     SparkThrowableHelper.getMessage(errorClass, errorSubClass.orNull, 
messageParameters, summary))
-    with SparkThrowable {
+  with SparkThrowable {
+
+  override def getMessageParameters: Array[String] = {
+    SparkThrowableHelper.getMessageParameters(errorClass, 
errorSubClass.orNull, messageParameters)
+  }
 
-  override def getMessageParameters: Array[String] = messageParameters
   override def getErrorClass: String = errorClass
   override def getErrorSubClass: String = errorSubClass.orNull
   override def getQueryContext: Array[QueryContext] = context
 }
 
-/**
- * No such method exception thrown from Spark with an error class.
- */
-private[spark] class SparkNoSuchMethodException(
-    errorClass: String,
-    errorSubClass: Option[String] = None,
-    messageParameters: Array[String])
-  extends NoSuchMethodException(
-    SparkThrowableHelper.getMessage(errorClass, errorSubClass.orNull, 
messageParameters))
-    with SparkThrowable {
-
-  override def getMessageParameters: Array[String] = messageParameters
-  override def getErrorClass: String = errorClass
-  override def getErrorSubClass: String = errorSubClass.orNull}
-
 /**
  * Illegal argument exception thrown from Spark with an error class.
  */
 private[spark] class SparkIllegalArgumentException(
     errorClass: String,
     errorSubClass: Option[String] = None,
-    messageParameters: Array[String],
+    messageParameters: Map[String, String],

Review Comment:
   It is tested by QueryExecutionErrorsSuite "CONVERSION_INVALID_INPUT: 
to_binary conversion function"



-- 
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