Github user viirya commented on a diff in the pull request: https://github.com/apache/spark/pull/21371#discussion_r189448749 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/json/JsonInferSchema.scala --- @@ -66,8 +69,12 @@ private[sql] object JsonInferSchema { s"Parse Mode: ${FailFastMode.name}.", e) } } - } - }.fold(StructType(Nil))( + }.fold(StructType(Nil))( + compatibleRootType(columnNameOfCorruptRecord, parseMode)) + Iterator(typeInPartition) + }.collect() --- End diff -- Previously two foldings with `compatibleRootType` on executors and local in one `RDD.fold` call all use default SQL config values. Now on executors SQL config can work, so inconsistency happens because local folding uses default SQL config.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org