Github user yhuai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2323#discussion_r17399017
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/json/JsonRDD.scala 
---
    @@ -253,7 +254,7 @@ private[sql] object JsonRDD extends Logging {
           // This issue is documented at 
https://issues.scala-lang.org/browse/SI-7005
           JMapWrapper(map).mapValues(scalafy).map(identity)
         case list: java.util.List[_] =>
    -      JListWrapper(list).map(scalafy)
    +      (list: Seq[_]).map(scalafy)
    --- End diff --
    
    Oh, after checking the code again, I think `.map(scalafy)` will convert the 
`JListWrapper` at here to an `ArrayBuffer` (`JListWrapper` is a  `Buffer` and 
`Buffer`'s `newBuilder` returns `ArrayBuffer`) and we will not have the Kryo 
issue. I tried `from pyspark.sql import 
SQLContext;SQLContext(sc).jsonRDD(sc.parallelize(['{"a":[3]}']))._jschema_rdd.collect()`
 and it's fine.


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