HyukjinKwon commented on a change in pull request #23639: [SPARK-26716][SQL]
FileFormat: the supported types of read/write should be consistent
URL: https://github.com/apache/spark/pull/23639#discussion_r250913711
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonGenerator.scala
##########
@@ -178,7 +178,7 @@ private[sql] class JacksonGenerator(
var i = 0
while (i < row.numFields) {
val field = schema(i)
- if (!row.isNullAt(i)) {
+ if (!row.isNullAt(i) || field.dataType == NullType) {
Review comment:
It's trivial but removing `isReadPath` is also a trivial point. I think we
should either provide an option to control it (which I think is a bit of an
overkill) or keep the behaviour since other `null`s from other types are being
ignored but writing out `null`s only for `NullType` sounds counter intuitive.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]