GitHub user makagonov opened a pull request:
https://github.com/apache/spark/pull/20884
[SPARK-23773][SQL] JacksonGenerator does not include keys that have null
value for StructTypes
## What changes were proposed in this pull request?
As stated in Jira, when `toJSON` is called on a dataset, the result JSON
string will not have keys displayed for `StructType`s that have null value.
This PR fixes the issue and writes field with "null" value.
## How was this patch tested?
Added a unit test to `JsonSuite.scala`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/makagonov/spark SPARK-23773
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/20884.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #20884
----
commit 9faf8533d044bd667bac6fb1925f2d38c4d281d4
Author: Sergey Makagonov <makagonov@...>
Date: 2018-03-22T19:38:44Z
[SPARK-23773][SQL] JacksonGenerator does not include keys that have null
value for StructTypes
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]