Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/10043#discussion_r46482061
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/json/JacksonParser.scala
---
@@ -266,11 +266,7 @@ object JacksonParser {
} else {
array.toArray[InternalRow](schema)
}
- case _ =>
- sys.error(
- s"Failed to parse record $record. Please make sure that
each line of " +
- "the file (or each string in the RDD) is a valid JSON
object or " +
- "an array of JSON objects.")
+ case _ => failedRecord(record)
--- End diff --
For that place, we can still throw. But, then, we catch the exception at
https://github.com/apache/spark/pull/10043/files#diff-8affe5ec7d691943a88e43eb30af656eR272.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]