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 1c42e2c commit 4a472deCopy full SHA for 4a472de
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/json/JsonSuite.scala
@@ -1664,4 +1664,19 @@ class JsonSuite extends QueryTest with SharedSQLContext with TestJsonData {
1664
)
1665
}
1666
1667
+
1668
+ test("wide nested json table") {
1669
+ val nested = (1 to 100).map { i =>
1670
+ s"""
1671
+ |"c$i": $i
1672
+ """.stripMargin
1673
+ }.mkString(", ")
1674
+ val json = s"""
1675
+ |{"a": [{$nested}], "b": [{$nested}]}
1676
1677
+ val rdd = sqlContext.sparkContext.makeRDD(Seq(json))
1678
+ val df = sqlContext.read.json(rdd)
1679
+ assert(df.schema.size === 2)
1680
+ df.collect()
1681
+ }
1682
0 commit comments