You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/07/06 10:23:15 UTC
[GitHub] [spark] HyukjinKwon commented on a change in pull request #33212: [SPARK-35912][SQL] Fix nullability of `spark.read.json`
HyukjinKwon commented on a change in pull request #33212:
URL: https://github.com/apache/spark/pull/33212#discussion_r664430269
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala
##########
@@ -404,6 +407,19 @@ class JacksonParser(
}
}
+ // When the input schema is setting to `nullable = false`, make sure the field is not null.
+ var index = 0
+ while (badRecordException.isEmpty && !skipRow && index < schema.length) {
Review comment:
Can we fix `parseJsonToken` instead by passing `nullable` bool flag?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org