spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-17374) Improves the error message when fails to parse some json file lines in DataFrameReader
Date Fri, 02 Sep 2016 06:52:21 GMT

    [ https://issues.apache.org/jira/browse/SPARK-17374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15457716#comment-15457716
] 

Apache Spark commented on SPARK-17374:
--------------------------------------

User 'clockfly' has created a pull request for this issue:
https://github.com/apache/spark/pull/14929

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


Mime
View raw message