We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1eeb769 commit 50a03b0Copy full SHA for 50a03b0
sql/core/src/main/scala/org/apache/spark/sql/json/JSONRelation.scala
@@ -44,11 +44,11 @@ private[sql] case class JSONRelation(
44
private def baseRDD = sqlContext.sparkContext.textFile(fileName)
45
46
override val schema = userSpecifiedSchema.getOrElse(
47
- JsonRDD.inferSchema(
48
- baseRDD,
49
- samplingRatio,
50
- sqlContext.columnNameOfCorruptRecord)
51
- )
+ JsonRDD.nullTypeToStringType(
+ JsonRDD.inferSchema(
+ baseRDD,
+ samplingRatio,
+ sqlContext.columnNameOfCorruptRecord)))
52
53
override def buildScan() =
54
JsonRDD.jsonStringToRow(baseRDD, schema, sqlContext.columnNameOfCorruptRecord)
0 commit comments