HyukjinKwon commented on code in PR #36666: URL: https://github.com/apache/spark/pull/36666#discussion_r883322754
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JSONOptions.scala: ########## @@ -54,31 +54,31 @@ private[sql] class JSONOptions( val samplingRatio = parameters.get("samplingRatio").map(_.toDouble).getOrElse(1.0) val primitivesAsString = - parameters.get("primitivesAsString").map(_.toBoolean).getOrElse(false) + parameters.get("primitivesAsString").exists(_.toBoolean) Review Comment: I think this case actually map and getOrElse is easier to read .. -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org