You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2018/11/04 08:25:00 UTC
[jira] [Commented] (SPARK-25935) Prevent null rows from JSON parser
[ https://issues.apache.org/jira/browse/SPARK-25935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16674344#comment-16674344 ]
Apache Spark commented on SPARK-25935:
--------------------------------------
User 'MaxGekk' has created a pull request for this issue:
https://github.com/apache/spark/pull/22938
> Prevent null rows from JSON parser
> ----------------------------------
>
> Key: SPARK-25935
> URL: https://issues.apache.org/jira/browse/SPARK-25935
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 2.4.0
> Reporter: Maxim Gekk
> Priority: Minor
>
> Currently, JSON parser can produce nulls if it cannot detect any valid JSON token on the root level, see https://github.com/apache/spark/blob/4d6704db4d490bd1830ed3c757525f41058523e0/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala#L402 . As a consequence of that, the from_json() function can produce null in the PERMISSIVE mode. To prevent that, need to throw an exception which should treat as a bad record and handled according specified mode.
--
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