You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/09/09 17:02:00 UTC
[jira] [Assigned] (SPARK-40400) Pass error message parameters to exceptions as a map
[ https://issues.apache.org/jira/browse/SPARK-40400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-40400:
------------------------------------
Assignee: Max Gekk (was: Apache Spark)
> 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
> Priority: Major
>
> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org