Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4492#discussion_r24472213
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/json/JsonRDD.scala 
---
    @@ -127,7 +135,7 @@ private[sql] object JsonRDD extends Logging {
           StructType((topLevelFields ++ structFields).sortBy(_.name))
         }
     
    -    makeStruct(resolved.keySet.toSeq, Nil)
    +    nullTypeToStringType(makeStruct(resolved.keySet.toSeq, Nil))
    --- End diff --
    
    Yeah, I understand that, but this is in the `createSchema` method, it 
supposes the `union` operations have been done before this method is called, 
doesn't it?
    see 
https://github.com/chenghao-intel/spark/blob/json_inferschema/sql/core/src/main/scala/org/apache/spark/sql/json/JsonRDD.scala#L53
    
https://github.com/chenghao-intel/spark/blob/json_inferschema/sql/core/src/main/scala/org/apache/spark/sql/json/JsonRDD.scala#L61
    
    Sorry, I am not sure if you are talking about to merge 2 `StructType` in 
the future, if it is, I will update the code.


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

Reply via email to