You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Max Gekk (Jira)" <ji...@apache.org> on 2022/08/19 15:12:00 UTC

[jira] [Resolved] (SPARK-40018) Output SparkThrowable to SQL golden files in JSON format

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

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

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

> Output SparkThrowable to SQL golden files in JSON format
> --------------------------------------------------------
>
>                 Key: SPARK-40018
>                 URL: https://issues.apache.org/jira/browse/SPARK-40018
>             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
>
>
> Output content of SparkThrowable in the JSON format instead of plain text.
> For instance, replace:
> {code}
> [INVALID_ARRAY_INDEX_IN_ELEMENT_AT] The index 5 is out of bounds. The array has 3 elements. Use `try_element_at` to tolerate accessing element at invalid index and return NULL instead. If necessary set "spark.sql.ansi.enabled" to "false" to bypass this error.
> == SQL(line 1, position 8) ==
> select element_at(array(1, 2, 3), 5)
>        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> {code}
> by
> {code}
> {"errorClass":"INVALID_ARRAY_INDEX_IN_ELEMENT_AT","messageParameters":["5","3","\"spark.sql.ansi.enabled\""],"queryContext":[{"objectType":"","objectName":"","startIndex":7,"stopIndex":35,"fragment":"element_at(array(1, 2, 3), 5"}]}
> {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