Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22237#discussion_r223703462
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala
 ---
    @@ -90,6 +91,10 @@ class JacksonParser(
             // in such an array as a row, this case is possible.
             if (array.numElements() == 0) {
               Nil
    +        } else if (array.numElements() > 1 && !explodeArray) {
    --- End diff --
    
    shall we forbid array as struct type completely for `from_json`?
    
    BTW I think this feature is not needed now, since we can directly read 
top-level json arrays as array type. We may still need to keep it when reading 
json files, but I think it's ok to drop it in `from_json`.


---

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

Reply via email to