-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-3447][SQL] Remove explicit conversion with JListWrapper to avoid NPE #2323
Conversation
/cc @yhuai |
QA tests have started for PR 2323 at commit
|
QA tests have finished for PR 2323 at commit
|
|
I've updated the usage in JSON RDD. Java Row wrapping should never happen before Kryo serialization AFAICT. |
Jenkins, test this please |
QA tests have started for PR 2323 at commit
|
Tests timed out after a configured wait of |
Jenkins, test this please. |
1 similar comment
Jenkins, test this please. |
QA tests have started for PR 2323 at commit
|
QA tests have finished for PR 2323 at commit
|
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Okay, I reverted the JSON rdd changed and merged this to master. Thanks! |
I have experienced the same kind of problem when using Avro with spark streaming API. Above exception shows up when used output operations. below is the avro message. message is been successfully decoded in decoder, but throws exception for output operation. |
No description provided.