57eddc7182
## What changes were proposed in this pull request? 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 in `from_json`/`from_csv`/`from_avro`, 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. ## How was this patch tested? Unit test. Closes #22895 from gengliangwang/improve_error_msg. Authored-by: Gengliang Wang <gengliang.wang@databricks.com> Signed-off-by: hyukjinkwon <gurwls223@apache.org> |
||
---|---|---|
.. | ||
avro | ||
docker | ||
docker-integration-tests | ||
kafka-0-10 | ||
kafka-0-10-assembly | ||
kafka-0-10-sql | ||
kinesis-asl | ||
kinesis-asl-assembly | ||
spark-ganglia-lgpl |