Description
Actually when calling `toJSON` on a dataFrame with null values, it doesn't print them.
Basically the same idea than https://issues.apache.org/jira/browse/SPARK-23772.
val df = spark.sparkContext.parallelize(Seq("1", "2", null)).toDF("col1") df.toJSON -> {"col1":"1"},{"col1":"2"},{}
After the PR:
val result = df.toJSON(Map("ignoreNullFields" -> "false")).collect().mkString(",") val expected = """{"col1":"1"},{"col1":"2"},{"col1":null}"""
Takeshi Yamamuro Takuya Ueshin