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

Hyukjin Kwon commented on SPARK-19641:
--------------------------------------

Ah, thanks for cc'ing me. I happened to see the related comment. I will leave 
them here just in case anyone is curious.

https://github.com/apache/spark/pull/16386#issuecomment-280525182
https://github.com/NathanHowell/spark/commit/e233fd03346a73b3b447fa4c24f3b12c8b2e53ae

> JSON schema inference in DROPMALFORMED mode produces incorrect schema
> ---------------------------------------------------------------------
>
>                 Key: SPARK-19641
>                 URL: https://issues.apache.org/jira/browse/SPARK-19641
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.1.0
>            Reporter: Nathan Howell
>
> In {{DROPMALFORMED}} mode the inferred schema may incorrectly contain no 
> columns. This occurs when one document contains a valid JSON value (such as a 
> string or number) and the other documents contain objects or arrays.
> When the default case in {{JsonInferSchema.compatibleRootType}} is reached 
> when merging a {{StringType}} and a {{StructType}} the resulting type will be 
> a {{StringType}}, which is then discarded because a {{StructType}} is 
> expected.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to