stczwd commented on a change in pull request #26098: [SPARK-29444] Add configuration to support JacksonGenrator to keep fields with null values URL: https://github.com/apache/spark/pull/26098#discussion_r335316954
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JSONOptions.scala ########## @@ -76,6 +76,9 @@ private[sql] class JSONOptions( // Whether to ignore column of all null values or empty array/struct during schema inference val dropFieldIfAllNull = parameters.get("dropFieldIfAllNull").map(_.toBoolean).getOrElse(false) + // Whether to ignore column of all null during json generating + val structIngoreNull = parameters.getOrElse("structIngoreNull", "true").toBoolean Review comment: It works on StructType, including struct field and struct inner data ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org