[ 
https://issues.apache.org/jira/browse/SPARK-40400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Max Gekk resolved SPARK-40400.
------------------------------
    Fix Version/s: 3.4.0
       Resolution: Fixed

Issue resolved by pull request 37834
[https://github.com/apache/spark/pull/37834]

> 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
>             Fix For: 3.4.0
>
>
> 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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to