You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Gengliang Wang (JIRA)" <ji...@apache.org> on 2018/10/30 16:10:00 UTC

[jira] [Created] (SPARK-25886) Improve error message of `FailureSafeParser` and `from_avro` in FAILFAST mode

Gengliang Wang created SPARK-25886:
--------------------------------------

             Summary: 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


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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org