@@ -248,26 +248,26 @@ class JsonSuite extends QueryTest {
248248 val jsonDF = jsonRDD(complexFieldAndType1)
249249
250250 val expectedSchema = StructType (
251- StructField (" arrayOfArray1" , ArrayType (ArrayType (StringType , false ), false ), true ) ::
252- StructField (" arrayOfArray2" , ArrayType (ArrayType (DoubleType , false ), false ), true ) ::
253- StructField (" arrayOfBigInteger" , ArrayType (DecimalType .Unlimited , false ), true ) ::
254- StructField (" arrayOfBoolean" , ArrayType (BooleanType , false ), true ) ::
255- StructField (" arrayOfDouble" , ArrayType (DoubleType , false ), true ) ::
256- StructField (" arrayOfInteger" , ArrayType (LongType , false ), true ) ::
257- StructField (" arrayOfLong" , ArrayType (LongType , false ), true ) ::
251+ StructField (" arrayOfArray1" , ArrayType (ArrayType (StringType , true ), true ), true ) ::
252+ StructField (" arrayOfArray2" , ArrayType (ArrayType (DoubleType , true ), true ), true ) ::
253+ StructField (" arrayOfBigInteger" , ArrayType (DecimalType .Unlimited , true ), true ) ::
254+ StructField (" arrayOfBoolean" , ArrayType (BooleanType , true ), true ) ::
255+ StructField (" arrayOfDouble" , ArrayType (DoubleType , true ), true ) ::
256+ StructField (" arrayOfInteger" , ArrayType (LongType , true ), true ) ::
257+ StructField (" arrayOfLong" , ArrayType (LongType , true ), true ) ::
258258 StructField (" arrayOfNull" , ArrayType (StringType , true ), true ) ::
259- StructField (" arrayOfString" , ArrayType (StringType , false ), true ) ::
259+ StructField (" arrayOfString" , ArrayType (StringType , true ), true ) ::
260260 StructField (" arrayOfStruct" , ArrayType (
261261 StructType (
262262 StructField (" field1" , BooleanType , true ) ::
263263 StructField (" field2" , StringType , true ) ::
264- StructField (" field3" , StringType , true ) :: Nil ), false ), true ) ::
264+ StructField (" field3" , StringType , true ) :: Nil ), true ), true ) ::
265265 StructField (" struct" , StructType (
266266 StructField (" field1" , BooleanType , true ) ::
267267 StructField (" field2" , DecimalType .Unlimited , true ) :: Nil ), true ) ::
268268 StructField (" structWithArrayFields" , StructType (
269- StructField (" field1" , ArrayType (LongType , false ), true ) ::
270- StructField (" field2" , ArrayType (StringType , false ), true ) :: Nil ), true ) :: Nil )
269+ StructField (" field1" , ArrayType (LongType , true ), true ) ::
270+ StructField (" field2" , ArrayType (StringType , true ), true ) :: Nil ), true ) :: Nil )
271271
272272 assert(expectedSchema === jsonDF.schema)
273273
@@ -487,7 +487,7 @@ class JsonSuite extends QueryTest {
487487 val jsonDF = jsonRDD(complexFieldValueTypeConflict)
488488
489489 val expectedSchema = StructType (
490- StructField (" array" , ArrayType (LongType , false ), true ) ::
490+ StructField (" array" , ArrayType (LongType , true ), true ) ::
491491 StructField (" num_struct" , StringType , true ) ::
492492 StructField (" str_array" , StringType , true ) ::
493493 StructField (" struct" , StructType (
@@ -513,8 +513,8 @@ class JsonSuite extends QueryTest {
513513 val expectedSchema = StructType (
514514 StructField (" array1" , ArrayType (StringType , true ), true ) ::
515515 StructField (" array2" , ArrayType (StructType (
516- StructField (" field" , LongType , true ) :: Nil ), false ), true ) ::
517- StructField (" array3" , ArrayType (StringType , false ), true ) :: Nil )
516+ StructField (" field" , LongType , true ) :: Nil ), true ), true ) ::
517+ StructField (" array3" , ArrayType (StringType , true ), true ) :: Nil )
518518
519519 assert(expectedSchema === jsonDF.schema)
520520
@@ -541,7 +541,7 @@ class JsonSuite extends QueryTest {
541541 val expectedSchema = StructType (
542542 StructField (" a" , BooleanType , true ) ::
543543 StructField (" b" , LongType , true ) ::
544- StructField (" c" , ArrayType (LongType , false ), true ) ::
544+ StructField (" c" , ArrayType (LongType , true ), true ) ::
545545 StructField (" d" , StructType (
546546 StructField (" field" , BooleanType , true ) :: Nil ), true ) ::
547547 StructField (" e" , StringType , true ) :: Nil )
@@ -835,15 +835,15 @@ class JsonSuite extends QueryTest {
835835
836836 val schema = StructType (
837837 StructField (" field1" ,
838- ArrayType (ArrayType (ArrayType (ArrayType (StringType , false ), false ), true ), false ), true ) ::
838+ ArrayType (ArrayType (ArrayType (ArrayType (StringType , true ), true ), true ), true ), true ) ::
839839 StructField (" field2" ,
840840 ArrayType (ArrayType (
841- StructType (StructField (" Test" , LongType , true ) :: Nil ), false ), true ), true ) ::
841+ StructType (StructField (" Test" , LongType , true ) :: Nil ), true ), true ), true ) ::
842842 StructField (" field3" ,
843843 ArrayType (ArrayType (
844- StructType (StructField (" Test" , StringType , true ) :: Nil ), true ), false ), true ) ::
844+ StructType (StructField (" Test" , StringType , true ) :: Nil ), true ), true ), true ) ::
845845 StructField (" field4" ,
846- ArrayType (ArrayType (ArrayType (LongType , false ), true ), false ), true ) :: Nil )
846+ ArrayType (ArrayType (ArrayType (LongType , true ), true ), true ), true ) :: Nil )
847847
848848 assert(schema === jsonDF.schema)
849849
0 commit comments