Description
DataSet.toJSON will lost some column when field data is null. Maybe it is better to keep null data in some scenarios.
Such as sparkmagic, which is widely used in jupyter with livy, we use toJSON to toJSON is used to get sql results. with toJSON sparkmagic may return empty results, which confused users.
Maybe adding a config is the best choice. This configuration retains the current semantics and will remain fields with null until the configuration is modified.
Attachments
Issue Links
- Blocked
-
SPARK-23773 JacksonGenerator does not include keys that have null value for StructTypes
- Resolved
- is duplicated by
-
SPARK-29610 Keys with Null values are discarded when using to_json function
- Resolved
-
SPARK-37981 Deletes columns with all Null as default.
- Resolved
- links to