spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] stczwd commented on a change in pull request #26098: [SPARK-29444] Add configuration to support JacksonGenrator to keep fields with null values
Date Thu, 17 Oct 2019 05:41:44 GMT
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_r335817237
 
 

 ##########
 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 null fields during json generating
+  val ignoreNullFields = parameters.getOrElse("ignoreNullFields", "true").toBoolean
 
 Review comment:
   Perfect. Then the code in DataSet.scala is not necessary now.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message