You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (JIRA)" <ji...@apache.org> on 2016/09/06 14:22:20 UTC
[jira] [Updated] (SPARK-17374) Improves the error message when
fails to parse some json file lines in DataFrameReader
[ https://issues.apache.org/jira/browse/SPARK-17374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wenchen Fan updated SPARK-17374:
--------------------------------
Assignee: Sean Zhong
> Improves the error message when fails to parse some json file lines in DataFrameReader
> --------------------------------------------------------------------------------------
>
> Key: SPARK-17374
> URL: https://issues.apache.org/jira/browse/SPARK-17374
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Reporter: Sean Zhong
> Assignee: Sean Zhong
> Fix For: 2.1.0
>
>
> Demo case:
> We silently replace corrupted line with null without any error message.
> {code}
> import org.apache.spark.sql.types._
> val corruptRecords = spark.sparkContext.parallelize("""{"a":{, b:3}""" :: Nil)
> val schema = StructType(StructField("a", StringType, true) :: Nil)
> val jsonDF = spark.read.schema(schema).json(corruptRecords)
> scala> jsonDF.show
> +----+
> | a|
> +----+
> |null|
> +----+
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org