Max Gekk created SPARK-40400:
--------------------------------
Summary: Pass error message parameters to exceptions as a map
Key: SPARK-40400
URL: https://issues.apache.org/jira/browse/SPARK-40400
Project: Spark
Issue Type: Sub-task
Components: SQL
Affects Versions: 3.4.0
Reporter: Max Gekk
Assignee: Max Gekk
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:
{code:scala}
private[spark] class SparkRuntimeException(
errorClass: String,
errorSubClass: Option[String] = None,
messageParameters: Array[String]
...)
{code}
It should be replaced by:
{code:scala}
new SparkRuntimeException(
errorClass = "UNSUPPORTED_FEATURE",
errorSubClass = "LITERAL_TYPE",
messageParameters = Map(
"value" -> v.toString,
"type" -> v.getClass.toString))
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]