Description
Modify Spark exception to pass message parameters as a map not an array. At the moment, we still depend on the order of parameters in error-classes.json , so, we can change the text of error messages but not the order of parameters. For example, pass Map[String, String] instead of Array[String] in exceptions like:
private[spark] class SparkRuntimeException( errorClass: String, errorSubClass: Option[String] = None, messageParameters: Array[String] ...)
It should be replaced by:
new SparkRuntimeException( errorClass = "UNSUPPORTED_FEATURE", errorSubClass = "LITERAL_TYPE", messageParameters = Map( "value" -> v.toString, "type" -> v.getClass.toString))