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

Hyukjin Kwon reassigned SPARK-25886:
------------------------------------

    Assignee: Gengliang Wang

> Improve error message of `FailureSafeParser` and `from_avro` in FAILFAST mode
> -----------------------------------------------------------------------------
>
>                 Key: SPARK-25886
>                 URL: https://issues.apache.org/jira/browse/SPARK-25886
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Gengliang Wang
>            Assignee: Gengliang Wang
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> Currently in `FailureSafeParser` and `from_avro`, the exception is created 
> with such code
> ```
>   throw new SparkException("Malformed records are detected in record parsing. 
> " +
>     s"Parse Mode: ${FailFastMode.name}.", e.cause)
> ```
> 1. The cause part should be `e` instead of `e.cause`
> 2. If `e` contains non-null message, it should be shown, e.g. 
> ```com.fasterxml.jackson.core.JsonParseException: Unexpected character ('1' 
> (code 49)): was expecting a colon to separate field name and value
>  at [Source: (InputStreamReader); line: 1, column: 7]
> ```
> 3.Kindly show hint for trying PERMISSIVE in error message.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to