Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21371#discussion_r189453815
  
    --- 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 --
    
    good catch! but wondering how the test passed in my PR...


---

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

Reply via email to